sChuteLeech
0
-1
0
0
oEnemy
<undefined>
1
603
7
0
0
-1
2
self
0
0
1
action_inherited();
makeActive();
setCollisionBounds(-4, -4, 4, 0);
facing = 1;
noglide = 0;
myhealth = 15;
if (oControl.mod_randomgamebool == 1 && (global.wbeam == 0 || global.sbeam == 0 || global.pbeam == 0))
{
freezehp = floor(myhealth * .15);
if (freezehp < 1) freezehp = 1;
} //nerfed frozen enemies in random games
damage = 5;
hitsound = sndEHit4;
deathsound = sndEDeath1;
platyoffset = -8;
frozenspr = sChuteLeechFrozen;
target = 0;
canattack = 1;
state = 1;
image_speed = 0;
1
603
7
0
0
-1
2
self
0
0
1
canattack = 1;
1
603
7
0
0
-1
2
self
0
0
1
if(room == rm_a0h08 && instance_exists(oLavaSurface) && sprite_index != sChuteLeech_lava) {
sprite_index = sChuteLeech_lava;
}
1
603
7
0
0
-1
2
self
0
0
1
action_inherited();
enemy_active_check(20);
enemy_target_check(90, 1);
if (active == 1 && frozen == 0) {
if (state == 1) {
image_index = 2;
xVel = 0;
yVel = 0;
if (target && canattack) {
yVel = -5;
y -= 4;
state = 2;
image_index = 1;
}
}
if (state == 2) {
if (image_index >= 1) image_index -= 0.5;
if (isCollisionTop(2)) yVel = 0;
if (oCharacter.x > x) {
facing = 1;
} else facing = -1;
if (yVel >= 0) {
yVel = 0;
state = 3;
}
}
if (state == 3) {
if (image_index <= 6) image_index += 0.5;
if (isCollisionBottom(1)) {
yVel = 0;
xVel = 0;
canattack = 0;
alarm[0] = 60;
state = 1;
}
if ((global.difficulty != 2) && (noglide == 0)) {
xVel += 0.2 * facing;
if (abs(xVel) > 3) facing = -facing;
if (abs(xVel) > 1.3) yVel -= 0.16;
}
if (target == 1 && noglide == 0 && global.difficulty == 2) {
if (oCharacter.x > x && xVel < 4) xVel += 0.2;
if (oCharacter.x < x && xVel > -4) xVel -= 0.2;
}
}
if (state != 1) { // 1.5.1 fix
yVel += 0.1;
}
if (stun == 0) moveTo(xVel, yVel);
} // if (active == 1 && frozen == 0)
if (state == 100) enemy_death();
0
0
0
0.5
0.100000001490116
0
0.100000001490116
0.100000001490116
0.200000002980232
-1
-1