sBlobAir
0
-1
-3
0
oEnemy
<undefined>
1
603
7
0
0
-1
2
self
0
0
1
action_inherited();
makeActive();
setCollisionBounds(-4, -8, 4, 0);
image_speed = 0.3;
image_index = choose(0,1);
myhealth = 5;
damage = 7;
hitsound = sndEHit1;
deathsound = sndEDeath2;
platyoffset = -1;
frozenspr = sBlobAirFrozen;
target = 0;
canattack = 1;
state = 0;
yVelStart = random_range(-1.5,-1);
xVelStart = random_range(-1,1);
targetx = oCharacter.x;
targety = oCharacter.y - 20;
parent = -1;
randomx = irandom(room_width);
randomy = irandom(room_height);
1
603
7
0
0
-1
2
self
0
0
1
action_inherited();
enemy_active_check(20);
if (active == 1 && frozen == 0) {
if(state == 0)
{
if(statetime < 11)
{
yVel = random_range(-1.5,-.5);
xVel = random_range(-1,1);
}
else if(statetime > 10 && statetime < 60)
{
yVel = yVelStart;
xVel = xVelStart;
}
else state = 1;
}
if (state == 1) {
if (x < targetx) {
hspeed += 0.08;
} else {
hspeed -= 0.08;
}
if (y < targety) {
vspeed += 0.08;
} else vspeed -= 0.08;
speed = min(3, speed);
depth = -200;
}
if (stun == 0) moveTo(xVel, yVel);
if(instance_exists(parent)) {
if(point_distance(oCharacter.x, oCharacter.y - 16, parent.x, parent.y) < 320) {
targetx = oCharacter.x;
targety = oCharacter.y - 16;
}
else {
targetx = parent.x;
targety = parent.y - 45;
}
}
else {
targetx = randomx;
targety = randomy;
speed = min(12, speed);
}
}
if (state == 100) enemy_death();
if (y > global.waterlevel && global.waterlevel != 0) enemy_death();
1
603
7
0
0
-1
2
self
0
0
1
if (hitscrewattack) {
state = 100;
enemy_death();
}
0
0
0
0.5
0.100000001490116
0
0.100000001490116
0.100000001490116
0.200000002980232
-1
0