sTesterCannonM
0
-1
2
0
<undefined>
<undefined>
1
603
7
0
0
-1
2
self
0
0
1
canbeX = 0;
image_speed = 0;
open = 0;
type = 0;
last_frame = 0;
frame_speed = 0;
damaged = 0;
pproj = -4;
starthealth = 15;
//myhealth = starthealth;
myhealth = global.mod_testerHcannon;
shaking = 0;
flashing = 0;
offx = 0;
offy = 0;
canbehit = 0;
1
603
7
0
0
-1
2
self
0
0
1
if (type == 3) {
if (!damaged && open) {
prj = instance_create(x, y, oTesterSpazerBeam);
prj.direction = image_angle;
prj.image_angle = image_angle;
prj.speed = 4;
if (global.difficulty == 1) {
prj = instance_create(x, y, oTesterSpazerBeam);
prj.direction = image_angle + 40;
prj.image_angle = image_angle + 40;
prj.speed = 4;
prj = instance_create(x, y, oTesterSpazerBeam);
prj.direction = image_angle - 40;
prj.image_angle = image_angle - 40;
prj.speed = 4;
}
if (global.difficulty >= 2) {
prj = instance_create(x, y, oTesterSpazerBeam);
prj.direction = image_angle + 30;
prj.image_angle = image_angle + 30;
prj.speed = 5;
prj = instance_create(x, y, oTesterSpazerBeam);
prj.direction = image_angle - 30;
prj.image_angle = image_angle - 30;
prj.speed = 5;
prj = instance_create(x, y, oTesterSpazerBeam);
prj.direction = image_angle + 60;
prj.image_angle = image_angle + 60;
prj.speed = 5;
prj = instance_create(x, y, oTesterSpazerBeam);
prj.direction = image_angle - 60;
prj.image_angle = image_angle - 60;
prj.speed = 5;
}
with (oTester) alarm[0] = 1;
} // if (!damaged && open)
if (open) {
if (global.difficulty < 2) {
alarm[0] = 16;
} else alarm[0] = 10;
}
} // if (type == 3)
if (type == 2) {
if (!damaged && open) {
prj = instance_create(x, y, oTesterWaveBeam);
prj.direction = image_angle;
prj.image_angle = image_angle;
prj.speed = 6;
if (x < 160) {
prj.hspeed -= 6;
} else prj.hspeed += 6;
with (oTester) alarm[0] = 1;
}
if (open) alarm[0] = 8;
}
1
603
7
0
0
-1
2
self
0
0
1
switch (type) {
case 0: {
sprite_index = sTesterCannonM;
last_frame = 4;
frame_speed = 0.5;
break;
}
case 1: {
sprite_index = sTesterCannonI;
last_frame = 2;
frame_speed = 0.2;
break;
}
case 2: {
sprite_index = sTesterCannonW;
last_frame = 2;
frame_speed = 0.2;
break;
}
case 3: {
sprite_index = sTesterCannonS;
last_frame = 2;
frame_speed = 0.2;
break;
}
case 4: {
sprite_index = sTesterCannonP;
last_frame = 2;
frame_speed = 0.2;
break;
}
} // switch (type)
if (open == 0) {
if (image_index > 0.001) image_index -= frame_speed; // should be fixed
} else if (image_index < last_frame) image_index += frame_speed;
if (instance_exists(pproj)) {
pproj.image_angle = image_angle;
pproj.x = x;
pproj.y = y;
}
if (shaking > 0) {
shaking -= 1;
offx = random_range(-1, 1);
offy = random_range(-1, 1);
} else {
offx = 0;
offy = 0;
}
if (flashing > 0) flashing -= 1;
if (oTester.target_coff > (oTester.coffmax - 10)) {
canbehit = 1;
} else canbehit = 0;
1
603
7
0
0
-1
2
self
0
0
1
with (other) event_user(0);
1
603
7
0
0
-1
2
self
0
0
1
if (damaged == 0 && canbehit) {
with (other) event_user(0);
myhealth -= 5 * (1 + other.smissile * 2);
event_user(1);
}
1
603
7
0
0
-1
2
self
0
0
1
if (damaged == 0 && canbehit) {
with (other) {
event_user(0);
if (!pbeam) instance_destroy();
}
myhealth -= 2;
event_user(1);
}
1
603
7
0
0
-1
2
self
0
0
1
if (damaged == 0 && canbehit && !flashing) {
myhealth -= 3;
event_user(1);
}
1
603
7
0
0
-1
2
self
0
0
1
if (damaged == 0 && canbehit && !flashing) {
myhealth -= 1;
event_user(1);
}
1
603
7
0
0
-1
2
self
0
0
1
//myhealth = starthealth;
myhealth = global.mod_testerHcannon;
damaged = 0;
1
603
7
0
0
-1
2
self
0
0
1
if (damaged == 0) {
shaking = 8;
flashing = 5;
repeat (2) instance_create(x, y, oDebris);
if (myhealth <= 0) {
damaged = 1;
if (instance_exists(pproj)) with (pproj) instance_destroy();
make_explosion1big(x, y);
repeat (5) spawn_rnd_pickup_at(x + random_range(-10, 10), y + random_range(-10, 10), 100);
repeat (8) instance_create(x, y, oDebris);
sfx_play(sndRobotExpl);
}
if (myhealth > 75) image_index = 0;
if (myhealth <= 75) image_index = 1;
if (myhealth <= 50) image_index = 2;
if (myhealth <= 25) image_index = 3;
sfx_stop(sndRobotHit2);
sfx_play(sndRobotHit2);
}
1
603
7
0
0
-1
2
self
0
0
1
var numproj;
if (!damaged) {
if (type == 0) {
prj = instance_create(x, y, oTesterMissile);
prj.direction = image_angle;
prj.image_angle = image_angle;
prj.speed = 2;
with (oTester) alarm[1] = 1;
}
if (type == 1) {
if (global.difficulty == 0) numproj = 1;
if (global.difficulty == 1) numproj = 3;
if (global.difficulty >= 2) numproj = 5;
i = 0;
repeat (numproj) {
prj = instance_create(x, y, oTesterIceBeam);
prj.direction = image_angle;
prj.image_angle = image_angle;
prj.speed = 1 + i;
i += 1;
}
with (oTester) alarm[2] = 1;
}
if (type == 4) {
pproj = instance_create(x, y, oTesterPlasmaBeam);
pproj.image_angle = image_angle;
}
if (type == 3 || type == 2) alarm[0] = 1;
} // if (!damaged)
1
603
7
0
0
-1
2
self
0
0
1
if (damaged == 0) {
draw_sprite_ext(sprite_index, -1, x + offx, y + offy, 1, 1, image_angle, -1, 1);
if (flashing) {
draw_set_blend_mode(bm_add);
repeat (2) draw_sprite_ext(sprite_index, -1, x + offx, y + offy, 1, 1, image_angle, -1, flashing / 5);
draw_set_blend_mode(bm_normal);
}
} else if (type == 0) {
draw_sprite_ext(sTesterCannonDestr, 0, x + offx, y + offy, 1, 1, image_angle, -1, 1);
} else draw_sprite_ext(sTesterCannonDestr, 1, x + offx, y + offy, 1, 1, image_angle, -1, 1);
0
0
0
0.5
0.100000001490116
0
0.100000001490116
0.100000001490116
0.200000002980232
-1
-1