You've already forked AM2R-Community-Updates
mirror of
https://github.com/izzy2lost/AM2R-Community-Updates.git
synced 2026-03-10 11:23:35 -07:00
399 lines
11 KiB
XML
399 lines
11 KiB
XML
<!--This Document is generated by GameMaker, if you edit it by hand then you do so at your own risk!-->
|
|
<object>
|
|
<spriteName>sTankBody</spriteName>
|
|
<solid>0</solid>
|
|
<visible>-1</visible>
|
|
<depth>0</depth>
|
|
<persistent>0</persistent>
|
|
<parentName><undefined></parentName>
|
|
<maskName><undefined></maskName>
|
|
<events>
|
|
<event eventtype="0" enumb="0">
|
|
<action>
|
|
<libid>1</libid>
|
|
<id>603</id>
|
|
<kind>7</kind>
|
|
<userelative>0</userelative>
|
|
<isquestion>0</isquestion>
|
|
<useapplyto>-1</useapplyto>
|
|
<exetype>2</exetype>
|
|
<functionname></functionname>
|
|
<codestring></codestring>
|
|
<whoName>self</whoName>
|
|
<relative>0</relative>
|
|
<isnot>0</isnot>
|
|
<arguments>
|
|
<argument>
|
|
<kind>1</kind>
|
|
<string>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;
|
|
</string>
|
|
</argument>
|
|
</arguments>
|
|
</action>
|
|
</event>
|
|
<event eventtype="1" enumb="0">
|
|
<action>
|
|
<libid>1</libid>
|
|
<id>603</id>
|
|
<kind>7</kind>
|
|
<userelative>0</userelative>
|
|
<isquestion>0</isquestion>
|
|
<useapplyto>-1</useapplyto>
|
|
<exetype>2</exetype>
|
|
<functionname></functionname>
|
|
<codestring></codestring>
|
|
<whoName>self</whoName>
|
|
<relative>0</relative>
|
|
<isnot>0</isnot>
|
|
<arguments>
|
|
<argument>
|
|
<kind>1</kind>
|
|
<string>if (instance_exists(cannon)) with (cannon) instance_destroy();
|
|
with (head) instance_destroy();
|
|
with (arm) instance_destroy();
|
|
with (bottom) instance_destroy();
|
|
</string>
|
|
</argument>
|
|
</arguments>
|
|
</action>
|
|
</event>
|
|
<event eventtype="2" enumb="10">
|
|
<action>
|
|
<libid>1</libid>
|
|
<id>603</id>
|
|
<kind>7</kind>
|
|
<userelative>0</userelative>
|
|
<isquestion>0</isquestion>
|
|
<useapplyto>-1</useapplyto>
|
|
<exetype>2</exetype>
|
|
<functionname></functionname>
|
|
<codestring></codestring>
|
|
<whoName>self</whoName>
|
|
<relative>0</relative>
|
|
<isnot>0</isnot>
|
|
<arguments>
|
|
<argument>
|
|
<kind>1</kind>
|
|
<string>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;
|
|
</string>
|
|
</argument>
|
|
</arguments>
|
|
</action>
|
|
</event>
|
|
<event eventtype="2" enumb="0">
|
|
<action>
|
|
<libid>1</libid>
|
|
<id>603</id>
|
|
<kind>7</kind>
|
|
<userelative>0</userelative>
|
|
<isquestion>0</isquestion>
|
|
<useapplyto>-1</useapplyto>
|
|
<exetype>2</exetype>
|
|
<functionname></functionname>
|
|
<codestring></codestring>
|
|
<whoName>self</whoName>
|
|
<relative>0</relative>
|
|
<isnot>0</isnot>
|
|
<arguments>
|
|
<argument>
|
|
<kind>1</kind>
|
|
<string>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
|
|
}
|
|
</string>
|
|
</argument>
|
|
</arguments>
|
|
</action>
|
|
</event>
|
|
<event eventtype="3" enumb="0">
|
|
<action>
|
|
<libid>1</libid>
|
|
<id>603</id>
|
|
<kind>7</kind>
|
|
<userelative>0</userelative>
|
|
<isquestion>0</isquestion>
|
|
<useapplyto>-1</useapplyto>
|
|
<exetype>2</exetype>
|
|
<functionname></functionname>
|
|
<codestring></codestring>
|
|
<whoName>self</whoName>
|
|
<relative>0</relative>
|
|
<isnot>0</isnot>
|
|
<arguments>
|
|
<argument>
|
|
<kind>1</kind>
|
|
<string>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;
|
|
</string>
|
|
</argument>
|
|
</arguments>
|
|
</action>
|
|
</event>
|
|
<event eventtype="4" ename="oBomb2">
|
|
<action>
|
|
<libid>1</libid>
|
|
<id>603</id>
|
|
<kind>7</kind>
|
|
<userelative>0</userelative>
|
|
<isquestion>0</isquestion>
|
|
<useapplyto>-1</useapplyto>
|
|
<exetype>2</exetype>
|
|
<functionname></functionname>
|
|
<codestring></codestring>
|
|
<whoName>self</whoName>
|
|
<relative>0</relative>
|
|
<isnot>0</isnot>
|
|
<arguments>
|
|
<argument>
|
|
<kind>1</kind>
|
|
<string>with (other) event_user(0);
|
|
</string>
|
|
</argument>
|
|
</arguments>
|
|
</action>
|
|
</event>
|
|
<event eventtype="4" ename="oMissile">
|
|
<action>
|
|
<libid>1</libid>
|
|
<id>603</id>
|
|
<kind>7</kind>
|
|
<userelative>0</userelative>
|
|
<isquestion>0</isquestion>
|
|
<useapplyto>-1</useapplyto>
|
|
<exetype>2</exetype>
|
|
<functionname></functionname>
|
|
<codestring></codestring>
|
|
<whoName>self</whoName>
|
|
<relative>0</relative>
|
|
<isnot>0</isnot>
|
|
<arguments>
|
|
<argument>
|
|
<kind>1</kind>
|
|
<string>if (state != 100) with (other) event_user(1);
|
|
</string>
|
|
</argument>
|
|
</arguments>
|
|
</action>
|
|
</event>
|
|
<event eventtype="4" ename="oCharacter">
|
|
<action>
|
|
<libid>1</libid>
|
|
<id>603</id>
|
|
<kind>7</kind>
|
|
<userelative>0</userelative>
|
|
<isquestion>0</isquestion>
|
|
<useapplyto>-1</useapplyto>
|
|
<exetype>2</exetype>
|
|
<functionname></functionname>
|
|
<codestring></codestring>
|
|
<whoName>self</whoName>
|
|
<relative>0</relative>
|
|
<isnot>0</isnot>
|
|
<arguments>
|
|
<argument>
|
|
<kind>1</kind>
|
|
<string>if (state != 100) damage_player(damage, 7, -3, 0, 0);
|
|
</string>
|
|
</argument>
|
|
</arguments>
|
|
</action>
|
|
</event>
|
|
<event eventtype="8" enumb="0">
|
|
<action>
|
|
<libid>1</libid>
|
|
<id>603</id>
|
|
<kind>7</kind>
|
|
<userelative>0</userelative>
|
|
<isquestion>0</isquestion>
|
|
<useapplyto>-1</useapplyto>
|
|
<exetype>2</exetype>
|
|
<functionname></functionname>
|
|
<codestring></codestring>
|
|
<whoName>self</whoName>
|
|
<relative>0</relative>
|
|
<isnot>0</isnot>
|
|
<arguments>
|
|
<argument>
|
|
<kind>1</kind>
|
|
<string>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));
|
|
</string>
|
|
</argument>
|
|
</arguments>
|
|
</action>
|
|
</event>
|
|
</events>
|
|
<PhysicsObject>0</PhysicsObject>
|
|
<PhysicsObjectSensor>0</PhysicsObjectSensor>
|
|
<PhysicsObjectShape>0</PhysicsObjectShape>
|
|
<PhysicsObjectDensity>0.5</PhysicsObjectDensity>
|
|
<PhysicsObjectRestitution>0.100000001490116</PhysicsObjectRestitution>
|
|
<PhysicsObjectGroup>0</PhysicsObjectGroup>
|
|
<PhysicsObjectLinearDamping>0.100000001490116</PhysicsObjectLinearDamping>
|
|
<PhysicsObjectAngularDamping>0.100000001490116</PhysicsObjectAngularDamping>
|
|
<PhysicsObjectFriction>0.200000002980232</PhysicsObjectFriction>
|
|
<PhysicsObjectAwake>-1</PhysicsObjectAwake>
|
|
<PhysicsObjectKinematic>-1</PhysicsObjectKinematic>
|
|
<PhysicsShapePoints/>
|
|
</object>
|