sSkorpBody
0
-1
0
0
oEnemy
<undefined>
1
603
7
0
0
-1
2
self
0
0
1
event_inherited();
myhealth = 50;
freezehp = 20;
damage = 8;
hitsound = sndEHit1;
deathsound = sndEDeath1;
canfreeze = 1;
frozenspr = sSkorpBodyFrozen;
freezefall = 0;
offset = 0;
attack = 0;
startx = x;
starty = y;
state = 0;
// 1.4.4 behavior change
image_speed = 0;
len = 11;
dir = 24;
//
disc1 = instance_create(x + lengthdir_x(len, image_angle + dir), y + lengthdir_y(len, image_angle + dir), oSkorpDisc);
disc2 = instance_create(x + lengthdir_x(len, image_angle - dir), y + lengthdir_y(len, image_angle - dir), oSkorpDisc);
lure = "OPTIMIZE *THIS*";
disc2.image_xscale = -1;
spin = 0;
alarm[0] = 10;
alarm[2] = 1;
alarm[4] = 2; //lure
1
603
7
0
0
-1
2
self
0
0
1
if (instance_exists(disc1) && instance_exists(disc2)) {
with (disc1) instance_destroy();
with (disc2) instance_destroy();
}
if (instance_exists(lure)) {
lure.state = 100;
}
1
603
7
0
0
-1
2
self
0
0
1
lure = instance_create(x, y, oSkorpLureA6);
// Lure
lure.x = x + lengthdir_x(10, image_angle);
lure.y = y + lengthdir_y(10, image_angle);
lure.image_angle = image_angle;
1
603
7
0
0
-1
2
self
0
0
1
disc1.spin = 1;
disc2.spin = 1;
attack = 1;
alarm[1] = 120;
1
603
7
0
0
-1
2
self
0
0
1
offset = 0;
1
603
7
0
0
-1
2
self
0
0
1
disc1.spin = 0;
disc2.spin = 0;
attack = 0;
alarm[0] = 100; //og 120
if (instance_exists(lure)) {
lure.alarm[1] = 20;
}
1
603
7
0
0
-1
2
self
0
0
1
if (distance_to_object(oCharacter) < 80) {
alarm[3] = 20;
if (instance_exists(lure)) {
lure.image_index = 0;
switch (image_angle) {
case 90: {
lure.sprite_index = sSkorpLureUpVA6;
break;
}
default: {
lure.sprite_index = sSkorpLureVA6;
break;
}
}
}
} else alarm[0] = 10;
1
603
7
0
0
-1
2
self
0
0
1
if (attack) {
if (offset < 24) offset += 2;
} else if (offset > 0) offset -= 1;
image_index = floor(offset/4.8);
// Generate disc offsets
switch (floor(image_index)) {
case 0: {
len = 11; // 13?
dir = 24;
break;
}
case 1: {
len = 13;
dir = 10;
break;
}
case 2: {
len = 16;
dir = 24;
break;
}
case 3:
case 4: {
len = 18;
dir = 36;
break;
}
}
// Discs
disc1.x = x + lengthdir_x(len, image_angle + dir);
disc1.y = y + lengthdir_y(len, image_angle + dir);
disc2.x = x + lengthdir_x(len, image_angle - dir);
disc2.y = y + lengthdir_y(len, image_angle - dir);
// Lure
//lure.x = lure.startx + lengthdir_x(offset, image_angle);
//lure.y = lure.starty + lengthdir_y(offset, image_angle);
x = startx + lengthdir_x(offset, image_angle);
y = starty + lengthdir_y(offset, image_angle);
if (state == 100) {
with (disc1) instance_destroy();
with (disc2) instance_destroy();
with (lure) {
state = 100;
}
enemy_death();
}
event_inherited();
1
603
7
0
0
-1
2
self
0
0
1
1
603
7
0
0
-1
2
self
0
0
1
event_inherited();
if (attack) {
frz.spr1 = sSkorpDiscFrozen;
frz.spr2 = sSkorpDiscFrozen;
} else {
frz.spr1 = sSkorpDiscLungeFrozen;
frz.spr2 = sSkorpDiscLungeFrozen;
}
frz.spr1xoff = lengthdir_x(len, dir);
frz.spr1yoff = lengthdir_y(len, dir);
frz.spr2xoff = lengthdir_x(len, -dir);
frz.spr2yoff = lengthdir_y(len, -dir);
frz.spr2xs = -1;
0
0
0
0.5
0.100000001490116
0
0.100000001490116
0.100000001490116
0.200000002980232
-1
0