SHARE
TWEET

Untitled

a guest Nov 22nd, 2019 104 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #define init
  2.     global.sprEqBullet = sprite_add("../Sprites/Projectiles/Plasma/EqBullet.png", 4, 8, 8);
  3.     global.sprEqDisappear = sprite_add("../Sprites/Projectiles/Plasma/EqDisappear.png", 8, 8, 8);
  4.  
  5. #define eq_bullet(_x, _y)
  6.     with instance_create(_x,_y,CustomProjectile){
  7.         name = "eq";
  8.         sprite_index = global.sprEqBullet;
  9.         mask_index = mskPlasma;
  10.         hitid = [sprite_index, "EQUALIZER"];
  11.         tries = 3200;
  12.         alarm0 = 200;
  13.         damage = 0;
  14.         force = 0;
  15.         typ = 2;
  16.         friction = 0.12;
  17.         image_xscale = 1 + (skill_get(17) * 0.2);
  18.         image_yscale = image_xscale;
  19.         image_index = 1;
  20.         image_speed = 0.25;
  21.         creator = other;
  22.         on_step = eq_step;
  23.         on_hit = eq_hit;
  24.         on_wall = eq_wall;
  25.         on_destroy = eq_destroy;
  26.         return id;
  27.     }
  28.    
  29. #define eq_hit
  30.      // Ya missed!
  31.      // Or did I?
  32.      // Yeah, ya did.
  33.      // I'm just gonna let this next part be a surprise.
  34.      
  35. #define eq_destroy
  36.     // But nobody came.
  37.  
  38. #define eq_step
  39.  
  40.      // Blinks & Booms:
  41.     if(alarm0 >= -50) alarm0 -= 1;
  42.     if(alarm0 <= 200 and alarm0 > 100) image_speed = 0.375;
  43.     if(alarm0 <= 100 and alarm0 > 50) image_speed = 0.50;
  44.     if(alarm0 <= 50 and alarm0 > 20) image_speed = 0.666;
  45.     if(alarm0 <= 20 and alarm0 > 0) {
  46.         sprite_index = global.sprEqDisappear;
  47.         image_angle = 0;
  48.         if (image_index+image_speed > image_number) {image_speed = 0}
  49.         else {image_speed = 0.25;}
  50.     }
  51.     if(alarm0 <= 10 and alarm0 >= -60)
  52.         trace(alarm0);  
  53.     if(alarm0 <= 100 and alarm0 > 0) {
  54.         trace((100 - alarm0) * (0.02 + (0.02 * skill_get(17))));
  55.         if !audio_is_playing(sndEyesLoop) sound_loop(sndEyesLoop)
  56.  
  57.         if !audio_is_playing(sndEyesLoopUpg) and skill_get(17) =1 sound_loop(sndEyesLoopUpg)
  58.             with enemy  {
  59.             if x > (other.x - 500) and x < (other.x + 500) and y > (other.y - 500) and y < (other.y + 500) {
  60.                 if place_free(x+lengthdir_x(((100 - other.alarm0) * (0.02 + (0.02 * skill_get(17)))),point_direction(x,y,other.x,other.y)),y)
  61.                     x += lengthdir_x(((100 - other.alarm0) * (0.02 + (0.02 * skill_get(17)))),point_direction(x,y,other.x,other.y))
  62.                 if place_free(x,y+lengthdir_y(((100 - other.alarm0) * (0.02 + (0.02 * skill_get(17)))),point_direction(x,y,other.x,other.y)))
  63.                     y += lengthdir_y(((100 - other.alarm0) * (0.02 + (0.02 * skill_get(17)))),point_direction(x,y,other.x,other.y))
  64.                
  65.                 }
  66.            
  67.             }
  68.             with chestprop {
  69.                 if x > (other.x - 500) and x < (other.x + 500) and y > (other.y - 500) and y < (other.y + 500){
  70.                     if place_free(x+lengthdir_x(((100 - other.alarm0) * (0.02 + (0.02 * skill_get(17)))),point_direction(x,y,other.x,other.y)),y)
  71.                         x += lengthdir_x(((100 - other.alarm0) * (0.02 + (0.02 * skill_get(17)))),point_direction(x,y,other.x,other.y))
  72.                     if place_free(x,y+lengthdir_y(((100 - other.alarm0) * (0.02 + (0.02 * skill_get(17)))),point_direction(x,y,other.x,other.y)))
  73.                         y += lengthdir_y(((100 - other.alarm0) * (0.02 + (0.02 * skill_get(17)))),point_direction(x,y,other.x,other.y))
  74.        
  75.                 }
  76.                
  77.             }
  78.             with instances_matching(Pickup, "mask_index", mskPickup) {
  79.                 if x > (other.x - 500) and x < (other.x + 500) and y > (other.y - 500) and y < (other.y + 500) {
  80.                     if place_free(x+lengthdir_x(((100 - other.alarm0) * (0.02 + (0.02 * skill_get(17)))),point_direction(x,y,other.x,other.y)),y)
  81.                         x += lengthdir_x(((100 - other.alarm0) * (0.02 + (0.02 * skill_get(17)))),point_direction(x,y,other.x,other.y))
  82.                     if place_free(x,y+lengthdir_y(((100 - other.alarm0) * (0.02 + (0.02 * skill_get(17)))),point_direction(x,y,other.x,other.y)))
  83.                         y += lengthdir_y(((100 - other.alarm0) * (0.02 + (0.02 * skill_get(17)))),point_direction(x,y,other.x,other.y))
  84.                    
  85.                 }
  86.                
  87.             }
  88.  
  89.             with RadChest {
  90.                 if x > (other.x - 500) and x < (other.x + 500) and y > (other.y - 500) and y < (other.y + 500) {
  91.                     if place_free(x+lengthdir_x(((100 - other.alarm0) * (0.02 + (0.02 * skill_get(17)))),point_direction(x,y,other.x,other.y)),y)
  92.                         x += lengthdir_x(((100 - other.alarm0) * (0.02 + (0.02 * skill_get(17)))),point_direction(x,y,other.x,other.y))
  93.                     if place_free(x,y+lengthdir_y(((100 - other.alarm0) * (0.02 + (0.02 * skill_get(17)))),point_direction(x,y,other.x,other.y)))
  94.                         y += lengthdir_y(((100 - other.alarm0) * (0.02 + (0.02 * skill_get(17)))),point_direction(x,y,other.x,other.y))
  95.                    
  96.                 }
  97.                
  98.             }
  99.             with projectile {
  100.                 if x > (other.x - 500) and x < (other.x + 500) and y > (other.y - 500) and y < (other.y + 500) and team != 2 and object_index != EnemyLaser {
  101.                     if place_free(x+lengthdir_x(((100 - other.alarm0) * (0.02 + (0.02 * skill_get(17)))),point_direction(x,y,other.x,other.y)+180),y)
  102.                         x += lengthdir_x(((100 - other.alarm0) * (0.02 + (0.02 * skill_get(17)))),point_direction(x,y,other.x,other.y)+180)
  103.                     if place_free(x,y+lengthdir_y(((100 - other.alarm0) * (0.02 + (0.02 * skill_get(17)))),point_direction(x,y,other.x,other.y)+180))
  104.                         y += lengthdir_y(((100 - other.alarm0) * (0.02 + (0.02 * skill_get(17)))),point_direction(x,y,other.x,other.y)+180)
  105.                    
  106.                 }
  107.                
  108.             }
  109.     }
  110.    
  111.     else if audio_is_playing(sndEyesLoop) or audio_is_playing(sndChickenLoop) {
  112.     audio_stop_sound(sndEyesLoop) audio_stop_sound(sndEyesLoopUpg) audio_stop_sound(sndChickenLoop)
  113.    
  114.     }
  115.     if(alarm0 = 0) {
  116.         eq_detonate();
  117.         draw_overlay(alarm0);
  118.     }
  119.     if(alarm0 <= -50) instance_destroy();
  120.  
  121. #define eq_detonate
  122.     sound_play(sndPlasmaBigExplode);    // Sound
  123.     view_shake_at(x, y, 400 * (4 *skill_get(17)));          // Screenshake
  124.     with instance_create(x,y,PlasmaImpact) {
  125.         image_xscale = 2 + (skill_get(17));
  126.         image_yscale = 2 + (skill_get(17));
  127.         damage = 50;
  128.         trace(damage);
  129.         alarm1 -= current_time_scale;
  130.         script_bind_draw(draw_overlay, -12, other.alarm1);
  131.         with instance_create(x,y,PortalClear) {
  132.             image_xscale = 2 + (skill_get(17));
  133.             image_yscale = 2 + (skill_get(17));
  134.         }
  135.     }   // Plasma Explosion
  136.    
  137. #define draw_overlay(alp)
  138.     if !instance_exists(self) exit;
  139.     draw_set_color(make_color_rgb(247, 192, 255));
  140.     draw_set_alpha(0.01 * alp);
  141.     draw_rectangle(
  142.         view_xview_nonsync,
  143.         view_yview_nonsync,  
  144.         view_xview_nonsync + game_width,
  145.         view_yview_nonsync + game_height,
  146.     0);
  147.     draw_set_color(c_white);
  148.     draw_set_alpha(1);
  149.    
  150.    
  151. #define eq_wall
  152.      // Bounce:
  153.     if(speed > 0){
  154.         move_bounce_solid(true);
  155.         image_angle = direction;
  156.         speed *= 0.9;
  157.         repeat(3) instance_create(x,y,Dust);
  158.         sound_play(sndPlasmaRifle);
  159.     }
  160.    
  161.  
  162. on_step = eq_step;
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top