sTankBody
0
-1
0
0
<undefined>
<undefined>
1
603
7
0
0
-1
2
self
0
0
1
canbeX = 0;
//damage = 40;
damage = global.mod_tankDamage;
wallx = x + 40;
alarm[0] = 300;
croffx = 38;
croffy = 16;
core = instance_create(x + croffx, y + croffy, oTankCore);
hoffx = 4;
hoffy = -35;
head = instance_create(x + hoffx, y + hoffy, oTankHead);
boffx = -39;
boffy = 101;
bottom = instance_create(x + boffx, y + boffy, oTankBottom);
shoffx = 0;
shoffy = 0;
shield = instance_create(x + shoffx, y + shoffy, oTankShield);
arm = instance_create(x, y, oTankArm);
aangle = 0;
tgt_aangle = 0;
cposx = x + lengthdir_x(35, 270 + aangle);
cposy = y + lengthdir_y(35, 270 + aangle);
coffx = 0;
coffy = 0;
cangle = 0;
tgt_cangle = 0;
cannon = instance_create(cposx, cposy, oTankCannon);
cam = instance_create(x, y, oTankCam);
targetx = 0;
targety = 0;
flashing = 0;
state = 0;
statetime = 0;
movespeed = 0;
scan_log(36, get_text("ScanEvents", "ScanMechanism"), 180, 0);
iceOff = 0;
1
603
7
0
0
-1
2
self
0
0
1
if (instance_exists(cannon)) with (cannon) instance_destroy();
with (head) instance_destroy();
with (arm) instance_destroy();
with (bottom) instance_destroy();
1
603
7
0
0
-1
2
self
0
0
1
expl = instance_create(x + random_range(-20, 55), y + random_range(-10, 95), oFXAnimSpark);
expl.image_speed = 0.5;
expl.additive = 0;
expl.sprite_index = sExpl1;
expl.depth = -20;
alarm[10] = 2;
1
603
7
0
0
-1
2
self
0
0
1
if (state != 100) {
prj = instance_create(x - 15, y, oTesterMissile);
prj.direction = 200 + random_range(-10, 10);
prj.image_angle = prj.direction;
prj.speed = 3;
sfx_play(sndFireball);
alarm[0] = 110; // originally 60
}
1
603
7
0
0
-1
2
self
0
0
1
targetx = oCharacter.x;
//if (oTankCannon.beamType != "ICE") targety = oCharacter.y - 16;
targety = oCharacter.y - 16;
wallx = x + 40;
if (state != 100) {
if (oCharacter.x < wallx) {
oCharacter.x = wallx;
}
}
if (state == 0) {
if (x < 80) {
x += 5;
} else bottom.image_speed = 0;
if (statetime == 0) x = -100;
if (statetime == 120) { // originally 300
state = 1;
statetime = 0;
movespeed = 0.1 + (0.1*oControl.mod_diffmult);
bottom.image_speed = movespeed;
}
}
if (state == 1) {
if (bottom.damaged == 0) {
if (x < 800) {
x += movespeed;
} else bottom.image_speed = 0;
}
}
if (state == 100) {
if (statetime == 0) {
with (head) {
event_user(1);
canhit = 0;
}
with (bottom) event_user(1);
with (cannon) event_user(1);
with (oTesterMissile) event_user(1);
alarm[10] = 1;
global.event[203] = 2;
}
if (statetime == 240) {
repeat (20) {
expl = instance_create(x + random_range(-45, 45), y + random_range(-20, 60), oFXAnimSpark);
expl.image_speed = 0.3 + random(0.5);
expl.additive = 0;
expl.sprite_index = sExpl1Big;
}
make_explosion3(x, y - 40);
repeat (20) instance_create(x + 10, y + 30, oDebris);
repeat (40) instance_create(x + 10, y + 30, oMetalDebrisBig);
instance_create(x, y, oScreenFlash);
sfx_play(sndRobotExpl);
sfx_play(sndMissileExpl);
spawn_many_powerups(x - 64, y - 48, 128, 160);
with (cam) instance_destroy();
instance_destroy();
}
} // if (state == 100)
if (aangle > tgt_aangle) {
aangle -= 1;
} else aangle += 1;
cposx = x + lengthdir_x(40, 270 + aangle);
cposy = y + lengthdir_y(40, 270 + aangle);
if (tgt_cangle > 180) tgt_cangle -= 360;
if (cangle > tgt_cangle) {
cangle -= 1;
if (cangle < -22) cangle = -22;
} else {
cangle += 1;
if (cangle > 60) cangle = 60;
}
if (instance_exists(core)) {
core.x = x + croffx;
core.y = y + croffy;
}
if (instance_exists(head)) {
head.x = x + hoffx;
head.y = y + hoffy;
if (!head.damaged) {
/*if (iceOff) {
tgt_cangle = point_direction(cposx, cposy, targetx, targety - (196 - oTankCannon.shots*32));
} else */
tgt_cangle = point_direction(cposx, cposy, targetx, targety);
} else tgt_cangle = point_direction(cposx, cposy, cposx + 200, random(200));
}
if (instance_exists(bottom)) {
bottom.x = x + boffx;
bottom.y = y + boffy;
if (bottom.damaged && y < 108) y += 1;
}
if (instance_exists(shield)) {
shield.x = x + shoffx;
shield.y = y + shoffy;
}
if (instance_exists(arm)) {
arm.x = x;
arm.y = y;
arm.aangle = aangle;
}
if (instance_exists(cannon)) {
if (cannon.damaged == 0) {
cannon.x = cposx;
cannon.y = cposy;
cannon.direction = cangle;
}
}
if (flashing > 0) flashing -= 1;
statetime += 1;
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 (state != 100) with (other) event_user(1);
1
603
7
0
0
-1
2
self
0
0
1
if (state != 100) damage_player(damage, 7, -3, 0, 0);
1
603
7
0
0
-1
2
self
0
0
1
draw_sprite_ext(sprite_index, -1, x, y, 1, 1, image_angle, -1, 1);
if (flashing) {
draw_set_blend_mode(bm_add);
repeat (2) draw_sprite_ext(sprite_index, -1, x, y, 1, 1, image_angle, -1, flashing / 5);
draw_set_blend_mode(bm_normal);
}
draw_set_color(c_white);
sep = 16;
draw_text(8, 8, "x: " + string(x));
draw_text(8, 8 + sep, "y: " + string(y));
0
0
0
0.5
0.100000001490116
0
0.100000001490116
0.100000001490116
0.200000002980232
-1
-1