Files
AM2R-Community-Updates/objects/oTankHead.object.gmx
2020-12-22 20:54:55 -06:00

340 lines
9.1 KiB
XML

<!--This Document is generated by GameMaker, if you edit it by hand then you do so at your own risk!-->
<object>
<spriteName>sTankHead</spriteName>
<solid>0</solid>
<visible>-1</visible>
<depth>0</depth>
<persistent>0</persistent>
<parentName>&lt;undefined&gt;</parentName>
<maskName>&lt;undefined&gt;</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;
//myhealth = 100;
myhealth = global.mod_tankHhead;
image_speed = 0.16;
shaking = 0;
flashing = 0;
offx = 0;
offy = 0;
damaged = 0;
damage = 40;
canhit = 1;
</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>if (shaking &gt; 0) {
shaking -= 1;
offx = random_range(-1, 1);
offy = random_range(-1, 1);
} else {
offx = 0;
offy = 0;
}
if (flashing &gt; 0) flashing -= 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 (damaged == 0) {
myhealth -= 10 * (1 + other.smissile * 2);
event_user(0);
with (other) event_user(0);
} else {
with (other) event_user(1);
}
</string>
</argument>
</arguments>
</action>
</event>
<event eventtype="4" ename="oBeam">
<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 (damaged == 0 &amp;&amp; flashing &lt; 3) {
myhealth -= 1;
event_user(0);
with (other) {
event_user(0);
if (!pbeam) instance_destroy();
}
} else {
with (other) {
event_user(1);
if (!pbeam) instance_destroy();
}
}
</string>
</argument>
</arguments>
</action>
</event>
<event eventtype="4" ename="oPBombExpl">
<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 (damaged == 0 &amp;&amp; !flashing) {
myhealth -= 10;
event_user(0);
}
</string>
</argument>
</arguments>
</action>
</event>
<event eventtype="4" ename="oBombExpl">
<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 (damaged == 0 &amp;&amp; !flashing) {
myhealth -= 1;
event_user(0);
}
</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 (canhit) damage_player(damage, 7, -3, 0, 0);
</string>
</argument>
</arguments>
</action>
</event>
<event eventtype="7" enumb="11">
<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 (damaged == 0) {
damaged = 1;
sprite_index = sTankHeadDest;
repeat (10) instance_create(x + 10, y, oDebris);
make_explosion1big(x + 10, y);
sfx_play(sndRobotExpl);
}
</string>
</argument>
</arguments>
</action>
</event>
<event eventtype="7" 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>if (damaged == 0) {
shaking = 8;
flashing = 5;
if (myhealth &gt; 60) sprite_index = sTankHead;
if (myhealth &lt;= 60) sprite_index = sTankHead2;
if (myhealth &lt;= 30) sprite_index = sTankHead3;
if (myhealth &lt;= 0) event_user(1);
sfx_stop(sndRobotHit2);
sfx_play(sndRobotHit2);
}
</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 + 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);
}
</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>