sA2SmallTurbine
0
-1
-101
0
<undefined>
<undefined>
1
603
7
0
0
-1
2
self
0
0
1
myhealth = 50;
stun = 0;
flashing = 0;
fxtimer = 0;
wall = instance_create(x, y + 16, oSolid2x1);
alarm[0] = 1;
canbehit = 1;
hitsound = sndRobotHit1;
deathsound = sndRobotExpl;
1
603
7
0
0
-1
2
self
0
0
1
with (wall) instance_destroy();
1
603
7
0
0
-1
2
self
0
0
1
if (lbubbles) {
b = instance_create(x - 96, y - 4 - random(24), oCurrentBubble);
b.hspeed = 3 + random(1);
b.xlimit = x;
}
if (rbubbles) {
b = instance_create(x + 112, y - 4 - random(24), oCurrentBubble);
b.hspeed = -3 - random(1);
b.xlimit = x + 32;
}
alarm[0] = 5 + random(3);
1
603
7
0
0
-1
2
self
0
0
1
if (stun > 0) stun -= 1;
if (flashing > 0) flashing -= 1;
if (fxtimer < 5) {
fxtimer += 1;
} else fxtimer = 0;
if (global.event[101] + 1 == eventno) {
canbehit = 1;
} else canbehit = 0;
if (global.currentsuit != 2) { // Draw player in
if (oCharacter.y > y - 48 && oCharacter.y < y + 16) {
if (oCharacter.x < x + 12) {
if (oCharacter.x > x - 96) with (oCharacter) if (isCollisionRight(2) == 0) x += 0.2;
if (oCharacter.x > x - 80) with (oCharacter) if (isCollisionRight(2) == 0 && state != 15) x += 0.1;
if (oCharacter.x > x - 64) with (oCharacter) if (isCollisionRight(2) == 0 && state != 15) x += 0.1;
if (oCharacter.x > x - 48) with (oCharacter) if (isCollisionRight(2) == 0 && state != 15) x += 0.1;
if (oCharacter.x > x - 32) with (oCharacter) if (isCollisionRight(2) == 0 && state != 15) x += 0.1;
if (oCharacter.x > x - 16) with (oCharacter) if (isCollisionRight(2) == 0 && state != 15) x += 0.1;
}
if (oCharacter.x > x + 18) {
if (oCharacter.x < x + 96 + 16) with (oCharacter) if (isCollisionLeft(2) == 0) x -= 0.2;
if (oCharacter.x < x + 80 + 16) with (oCharacter) if (isCollisionLeft(2) == 0 && state != 15) x -= 0.1;
if (oCharacter.x < x + 64 + 16) with (oCharacter) if (isCollisionLeft(2) == 0 && state != 15) x -= 0.1;
if (oCharacter.x < x + 48 + 16) with (oCharacter) if (isCollisionLeft(2) == 0 && state != 15) x -= 0.1;
if (oCharacter.x < x + 32 + 16) with (oCharacter) if (isCollisionLeft(2) == 0 && state != 15) x -= 0.1;
if (oCharacter.x < x + 16 + 16) with (oCharacter) if (isCollisionLeft(2) == 0 && state != 15) x -= 0.1;
}
}
}
//var bomb = instance_nearest(x, y, oBomb);
if (instance_exists(oBomb) && (distance_to_object(oBomb) <= 80) && (oBomb.y >= global.waterlevel)) with (oBomb) {
var dist = distance_to_point(oA2SmallTurbine.x + 16, oA2SmallTurbine.y - 2);
var dist2 = distance_to_point(oA2SmallTurbine.x + 16, oA2SmallTurbine.y + 16);
if ((dist <= 80) && (dist > 12)) {
var spd = clamp(180/dist, 0.1, 2.5);
x += lengthdir_x(spd,point_direction(x,y,oA2SmallTurbine.x + 16, oA2SmallTurbine.y - 2));
y += lengthdir_y(spd,point_direction(x,y,oA2SmallTurbine.x + 16, oA2SmallTurbine.y - 2));
} else if (dist <= 12) {
var spd = clamp(180/dist2, 0.1, 2.5);
x += lengthdir_x(spd,point_direction(x,y,oA2SmallTurbine.x + 16, oA2SmallTurbine.y + 16));
y += lengthdir_y(spd,point_direction(x,y,oA2SmallTurbine.x + 16, oA2SmallTurbine.y + 16));
}
if (dist2 <= 0) {
event_user(0);
}
}
/*with (oBomb) {
var turbine = instance_nearest(x, y, oA2SmallTurbine);
if (instance_exists(turbine)) {
if (distance_to_point(turbine.x + 16, turbine.y) > 16) {
}
}
}
/*
if (instance_exists(oBomb)) { // Draw bombs in
var bomb = instance_nearest(x, y, oBomb);
if (distance_to_object(bomb) < 80) {
with (bomb) {
var turb = instance_nearest(x, y, oA2SmallTurbine);
var xdist = abs(distance_to_point(turb.x + 16, y));
var ydist = distance_to_point(x, turb.y);
if (ydist < 48) {
if (xdist < 96) {
if ((turb.x + 16) < x) {
x -= 0.3;
x -= 0.6*(xdist/96);
} else if ((turb.x + 16) > x) {
x += 0.3;
x += 0.6*(xdist/96);
}
}
if (((turb.y + 16) > y) && (xdist < 12)) {
y += 0.6;
}
}
}
}
}
1
603
7
0
0
-1
2
self
0
0
1
if (stun == 0) event_user(0);
with (other) event_user(0);
1
603
7
0
0
-1
2
self
0
0
1
if (canbehit) {
if (stun == 0) event_user(0);
with (other) {
event_user(0);
instance_destroy();
}
}
1
603
7
0
0
-1
2
self
0
0
1
if (stun == 0) event_user(0);
1
603
7
0
0
-1
2
self
0
0
1
if (canbehit && stun == 0) event_user(0);
1
603
7
0
0
-1
2
self
0
0
1
if (canbehit && stun == 0) event_user(0);
1
603
7
0
0
-1
2
self
0
0
1
damage_player(4, 5, -6, 0, 0);
1
603
7
0
0
-1
2
self
0
0
1
expl = instance_create(x + 16, y + 16, oFXAnimSpark);
expl.image_speed = 0.5;
expl.additive = 0;
expl.sprite_index = sExpl1;
repeat (8) {
expl = instance_create(x + random(32), y + random(32), oFXAnimSpark);
expl.image_speed = 0.4 + random(0.4);
expl.additive = 0;
expl.sprite_index = sExpl1;
}
repeat (20) instance_create(x + 16, y + 3, oDebris);
PlaySoundMono(deathsound);
with (oMoveWater) instance_destroy();
o = instance_create(x, y, oMoveWater);
o.delay = 2;
if (eventno == 2) {
o.targety = 208;
global.event[101] = 2;
}
if (eventno == 3) {
o.targety = 304;
global.event[101] = 3;
}
if (eventno == 4) {
o.targety = 432;
global.event[101] = 4;
}
instance_activate_region(x - 64, y - 64, 128, 128, 1);
instance_destroy();
1
603
7
0
0
-1
2
self
0
0
1
myhealth -= other.damage;
if (myhealth <= 0) event_user(1);
stun = 4;
flashing = 5;
fxtimer = 0;
PlaySoundMono(hitsound);
1
603
7
0
0
-1
2
self
0
0
1
if (global.event[101] >= eventno) instance_destroy();
1
603
7
0
0
-1
2
self
0
0
1
if (!flashing) draw_sprite_ext(sprite_index, -1, x, y, image_xscale, 1, image_angle, -1, image_alpha);
if (flashing) {
draw_sprite_ext(sprite_index, -1, x, y, image_xscale, 1, image_angle, make_color_rgb(80, 80, 80), 1);
draw_set_blend_mode(bm_add);
repeat (3) draw_sprite_ext(sprite_index, -1, x, y, image_xscale, 1, image_angle, -1, 1 - fxtimer * 0.25);
draw_set_blend_mode(bm_normal);
}
0
0
0
0.5
0.100000001490116
0
0.100000001490116
0.100000001490116
0.200000002980232
-1
-1