sQueenProj
0
-1
-10
0
oEnemy
<undefined>
1
603
7
0
0
-1
2
self
0
0
1
action_inherited();
canbeX = 0;
//myhealth = 80;
myhealth = global.mod_queenHprojectile;
freezehp = 10;
//damage = 100;
damage = global.mod_queenDprojectile;
hitsound = sndEHit1;
deathsound = sndEDeath2;
platyoffset = -4;
frozenspr = sQueenProjFrozen;
target = 0;
canattack = 1;
flipx = 1;
hitbeam = 0;
hitmissile = 0;
hitmissileexpl = 0;
hitpbomb = 0;
hitbomb = 0;
hitscrewattack = 0;
hitpseudoscrew = 0;
state = 0;
facing = 1;
stuntime = 5;
accelx = 0.05;
accely = 0.02;
maxspx = 2;
maxspy = 1;
targetx = x;
targety = y;
startx = x;
starty = y;
CollisionTop = 0;
CollisionRight = 0;
CollisionLeft = 0;
CollisionBottom = 0;
shaking = 0;
image_speed = 0.25;
1
603
7
0
0
-1
2
self
0
0
1
CollisionTop = collision_line(x - 8, y - 7, x + 8, y - 7, oSolid, true, true);
CollisionRight = collision_line(x + 9, y + 6, x + 9, y - 6, oSolid, true, true);
CollisionLeft = collision_line(x - 9, y - 6, x - 9, y + 6, oSolid, true, true);
CollisionBottom = collision_line(x - 8, y + 7, x + 8, y + 7, oSolid, true, true);
if (state == 0) {
if (statetime == 0) {
hspeed = 4;
vspeed = random_range(-0.5, 0.5);
}
if (speed > 2) speed -= 0.05;
if (statetime == 120) {
state = 1;
statetime = 0;
}
}
if (state == 1) {
accelx = 0.1;
accely = 0.05;
maxspx = 1.5;
maxspy = 1;
targetx = oCharacter.x;
targety = oCharacter.y - 8;
if (targetx > x) hspeed += accelx;
if (targetx < x) hspeed -= accelx;
if (targety > y) vspeed += accely;
if (targety < y) vspeed -= accely;
hspeed = min(hspeed, maxspx);
hspeed = max(hspeed, -maxspx);
vspeed = min(vspeed, maxspy);
vspeed = max(vspeed, -maxspy);
if (statetime >= 150) {
state = 2;
statetime = 0;
}
}
if (state == 2) {
speed *= 0.9;
if (image_alpha > 0) {
image_alpha -= 0.1;
} else instance_destroy();
}
if (CollisionTop != 0) {
if (instance_exists(CollisionTop)) {
if (vspeed < 0) {
vspeed *= -1;
shaking = 1;
}
}
}
if (CollisionBottom != 0) {
if (instance_exists(CollisionBottom)) {
if (vspeed > 0) {
vspeed *= -1;
shaking = 1;
}
}
}
if (CollisionLeft != 0) {
if (instance_exists(CollisionLeft)) {
if (hspeed < 0) {
hspeed *= -1;
shaking = 1;
}
}
}
if (CollisionRight != 0) {
if (instance_exists(CollisionRight)) {
if (hspeed > 0) {
hspeed *= -1;
shaking = 1;
if (state == 0) vspeed = random_range(-2, 2);
}
}
}
if (shaking > 0) {
image_speed = 1;
} else if (image_speed > 0.25) image_speed -= 0.05;
if (state == 100) enemy_death();
if (shaking > 0) shaking -= 1;
if (image_alpha < 1) image_alpha += 0.05;
event_inherited();
1
603
7
0
0
-1
2
self
0
0
1
event_inherited();
shaking = 30;
direction = other.direction;
speed = 2;
if (state == 0) state = 1;
1
603
7
0
0
-1
2
self
0
0
1
if (other.ibeam) {
with (other) event_user(0);
PlaySoundMono(sndFreezeHit);
myhealth -= other.damage;
if (myhealth <= freezehp) {
frz = instance_create(x, y, oEnemyFrozen);
frz.image_xscale = facing;
frz.sprite_index = frozenspr;
frz.image_index = image_index;
frz.mask_index = frozenspr;
frz.image_angle = image_angle;
frz.xVel = hspeed;
frz.yVel = vspeed;
frz.depth = 10;
frz.falling = freezefall;
frz.canbeX = 0;
instance_destroy();
}
} else with (other) event_user(1);
with (other) if (!pbeam) instance_destroy();
direction = other.direction;
speed = 1;
shaking = 30;
if (state == 0) state = 1;
1
603
7
0
0
-1
2
self
0
0
1
shaking = 60;
speed = 0;
if (state == 0) state = 1;
1
603
7
0
0
-1
2
self
0
0
1
shaking = 10;
direction = 90;
speed = 2;
if (state == 0) state = 1;
1
603
7
0
0
-1
2
self
0
0
1
direction = point_direction(oCharacter.x, oCharacter.y - 16, x, y);
speed = 4;
if (!sfx_isplaying(sndDeflect)) sfx_play(sndDeflect);
if (state == 0) state = 1;
shaking = 8;
1
603
7
0
0
-1
2
self
0
0
1
draw_self();
0
0
0
0.5
0.100000001490116
0
0.100000001490116
0.100000001490116
0.200000002980232
-1
-1