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

273 lines
7.0 KiB
XML

<!--This Document is generated by GameMaker, if you edit it by hand then you do so at your own risk!-->
<object>
<spriteName>sRobotMine</spriteName>
<solid>0</solid>
<visible>-1</visible>
<depth>-3</depth>
<persistent>0</persistent>
<parentName>oEnemy</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>event_inherited();
canbeX = 0;
myhealth = 1;
damage = 30;
stuntime = 4;
hpush = 6;
vpush = -3;
hitmissileexpl = 0;
hitsound = sndEHit1;
deathsound = sndElectricExpl;
canfreeze = 1;
platyoffset = -6;
frozenspr = sRobotMineFrozen;
flipx = 0;
target = 0;
state = 0;
statetime = 0;
alarm[0] = 60 + random(60);
hitemp = 1;
empspr = sRobotMineDisabled;
targetx = x;
targety = y;
startx = x;
starty = y;
currtgt = 0;
interval = 60;
moveratio = 0.1;
for (i = 0; i &lt; 10; i += 1) {
tgtx[i] = x;
tgty[i] = y;
}
spark = -4;
</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>spark = instance_create(x, y, oFXAnimSpark);
spark.sprite_index = sRoboMineSpark;
spark.image_speed = 0.5;
spark.additive = 1;
spark.image_xscale = choose(1, -1);
spark.image_yscale = choose(1, -1);
spark.image_angle = random(360);
spark.depth = -5;
alarm[0] = 20 + random(40);
if (state == 100) alarm[0] = 10;
</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 (state == 0) {
if (statetime == interval) {
currtgt += 1;
if (tgtx[currtgt] == startx &amp;&amp; tgty[currtgt] == starty) currtgt = 0;
targetx = tgtx[currtgt];
targety = tgty[currtgt];
statetime = 0;
}
if (stun == 0 &amp;&amp; frozen == 0) {
x = lerp(x, targetx, moveratio);
y = lerp(y, targety, moveratio);
}
}
if (state == 100) {
if (statetime == 1) sfx_play(sndElectricOverload);
flashing = 10;
canbehit = 0;
if (statetime &gt; 120) event_user(1);
}
if (instance_exists(spark)) {
spark.x = x;
spark.y = y;
}
event_inherited();
</string>
</argument>
</arguments>
</action>
</event>
<event eventtype="4" ename="oRoboMineProj">
<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) {
state = 100;
statetime = 0;
alarm[0] = 1;
}
with (other) 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>event_inherited();
if (state != 100) {
state = 100;
statetime = 0;
alarm[0] = 1;
}
</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>enemy_death2();
i = 0;
repeat (36) {
prj = instance_create(x, y, oRoboMineProj);
prj.direction = i * 10;
prj.speed = 3;
prj = instance_create(x, y, oRoboMineProj);
prj.direction = i * 10;
prj.speed = 2;
prj = instance_create(x, y, oRoboMineProj);
prj.direction = i * 10;
prj.speed = 1;
i += 1;
}
</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>event_inherited();
alarm[0] = 1;
</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>