Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #define init
- global.sprEqBullet = sprite_add("../Sprites/Projectiles/Plasma/EqBullet.png", 4, 8, 8);
- global.sprEqDisappear = sprite_add("../Sprites/Projectiles/Plasma/EqDisappear.png", 8, 8, 8);
- #define eq_bullet(_x, _y)
- with instance_create(_x,_y,CustomProjectile){
- name = "eq";
- sprite_index = global.sprEqBullet;
- mask_index = mskPlasma;
- hitid = [sprite_index, "EQUALIZER"];
- tries = 3200;
- alarm0 = 200;
- damage = 0;
- force = 0;
- typ = 2;
- friction = 0.12;
- image_xscale = 1 + (skill_get(17) * 0.2);
- image_yscale = image_xscale;
- image_index = 1;
- image_speed = 0.25;
- creator = other;
- on_step = eq_step;
- on_hit = eq_hit;
- on_wall = eq_wall;
- on_destroy = eq_destroy;
- return id;
- }
- #define eq_hit
- // Ya missed!
- // Or did I?
- // Yeah, ya did.
- // I'm just gonna let this next part be a surprise.
- #define eq_destroy
- // But nobody came.
- #define eq_step
- // Blinks & Booms:
- if(alarm0 >= -50) alarm0 -= 1;
- if(alarm0 <= 200 and alarm0 > 100) image_speed = 0.375;
- if(alarm0 <= 100 and alarm0 > 50) image_speed = 0.50;
- if(alarm0 <= 50 and alarm0 > 20) image_speed = 0.666;
- if(alarm0 <= 20 and alarm0 > 0) {
- sprite_index = global.sprEqDisappear;
- image_angle = 0;
- if (image_index+image_speed > image_number) {image_speed = 0}
- else {image_speed = 0.25;}
- }
- if(alarm0 <= 10 and alarm0 >= -60)
- trace(alarm0);
- if(alarm0 <= 100 and alarm0 > 0) {
- trace((100 - alarm0) * (0.02 + (0.02 * skill_get(17))));
- if !audio_is_playing(sndEyesLoop) sound_loop(sndEyesLoop)
- if !audio_is_playing(sndEyesLoopUpg) and skill_get(17) =1 sound_loop(sndEyesLoopUpg)
- with enemy {
- if x > (other.x - 500) and x < (other.x + 500) and y > (other.y - 500) and y < (other.y + 500) {
- 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)
- x += lengthdir_x(((100 - other.alarm0) * (0.02 + (0.02 * skill_get(17)))),point_direction(x,y,other.x,other.y))
- 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)))
- y += lengthdir_y(((100 - other.alarm0) * (0.02 + (0.02 * skill_get(17)))),point_direction(x,y,other.x,other.y))
- }
- }
- with chestprop {
- if x > (other.x - 500) and x < (other.x + 500) and y > (other.y - 500) and y < (other.y + 500){
- 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)
- x += lengthdir_x(((100 - other.alarm0) * (0.02 + (0.02 * skill_get(17)))),point_direction(x,y,other.x,other.y))
- 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)))
- y += lengthdir_y(((100 - other.alarm0) * (0.02 + (0.02 * skill_get(17)))),point_direction(x,y,other.x,other.y))
- }
- }
- with instances_matching(Pickup, "mask_index", mskPickup) {
- if x > (other.x - 500) and x < (other.x + 500) and y > (other.y - 500) and y < (other.y + 500) {
- 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)
- x += lengthdir_x(((100 - other.alarm0) * (0.02 + (0.02 * skill_get(17)))),point_direction(x,y,other.x,other.y))
- 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)))
- y += lengthdir_y(((100 - other.alarm0) * (0.02 + (0.02 * skill_get(17)))),point_direction(x,y,other.x,other.y))
- }
- }
- with RadChest {
- if x > (other.x - 500) and x < (other.x + 500) and y > (other.y - 500) and y < (other.y + 500) {
- 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)
- x += lengthdir_x(((100 - other.alarm0) * (0.02 + (0.02 * skill_get(17)))),point_direction(x,y,other.x,other.y))
- 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)))
- y += lengthdir_y(((100 - other.alarm0) * (0.02 + (0.02 * skill_get(17)))),point_direction(x,y,other.x,other.y))
- }
- }
- with projectile {
- 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 {
- 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)
- x += lengthdir_x(((100 - other.alarm0) * (0.02 + (0.02 * skill_get(17)))),point_direction(x,y,other.x,other.y)+180)
- 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))
- y += lengthdir_y(((100 - other.alarm0) * (0.02 + (0.02 * skill_get(17)))),point_direction(x,y,other.x,other.y)+180)
- }
- }
- }
- else if audio_is_playing(sndEyesLoop) or audio_is_playing(sndChickenLoop) {
- audio_stop_sound(sndEyesLoop) audio_stop_sound(sndEyesLoopUpg) audio_stop_sound(sndChickenLoop)
- }
- if(alarm0 = 0) {
- eq_detonate();
- draw_overlay(alarm0);
- }
- if(alarm0 <= -50) instance_destroy();
- #define eq_detonate
- sound_play(sndPlasmaBigExplode); // Sound
- view_shake_at(x, y, 400 * (4 *skill_get(17))); // Screenshake
- with instance_create(x,y,PlasmaImpact) {
- image_xscale = 2 + (skill_get(17));
- image_yscale = 2 + (skill_get(17));
- damage = 50;
- trace(damage);
- alarm1 -= current_time_scale;
- script_bind_draw(draw_overlay, -12, other.alarm1);
- with instance_create(x,y,PortalClear) {
- image_xscale = 2 + (skill_get(17));
- image_yscale = 2 + (skill_get(17));
- }
- } // Plasma Explosion
- #define draw_overlay(alp)
- if !instance_exists(self) exit;
- draw_set_color(make_color_rgb(247, 192, 255));
- draw_set_alpha(0.01 * alp);
- draw_rectangle(
- view_xview_nonsync,
- view_yview_nonsync,
- view_xview_nonsync + game_width,
- view_yview_nonsync + game_height,
- 0);
- draw_set_color(c_white);
- draw_set_alpha(1);
- #define eq_wall
- // Bounce:
- if(speed > 0){
- move_bounce_solid(true);
- image_angle = direction;
- speed *= 0.9;
- repeat(3) instance_create(x,y,Dust);
- sound_play(sndPlasmaRifle);
- }
- on_step = eq_step;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement