You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
AM2R-TimeTrials/objects/oHornoad.object.gmx

242 lines
7.0 KiB

<!--This Document is generated by GameMaker, if you edit it by hand then you do so at your own risk!-->
<object>
<spriteName>sHornoadIdle</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>action_inherited();
makeActive();
setCollisionBounds(-4, -12, 4, 0);
image_index = floor(random(5));
myhealth = 10;
if (oControl.mod_randomgamebool == 1 &amp;&amp; (global.wbeam == 0 || global.sbeam == 0 || global.pbeam == 0)){
freezehp = floor(myhealth * .15);
if (freezehp &lt; 1) freezehp = 1;
} //nerfed frozen enemies in random games
damage = 6;
hitsound = sndEHit1;
deathsound = sndEDeath1;
platyoffset = -14;
frozenspr = sHornoadFrozen;
canattack = 1;
jumpheight = -2;
state = 1;
alarm[0] = 60 + random(120);
alarm[1] = 90 + random(200);
alarm[2] = 200 + random(200);
</string>
</argument>
</arguments>
</action>
</event>
<event eventtype="2" enumb="2">
<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>alarm[2] = 200 + random(220);
if (active == 1 &amp;&amp; state == 1 &amp;&amp; target == 1 &amp;&amp; y &lt;= oCharacter.y &amp;&amp; y &gt;= oCharacter.y - 32) {
state = 5;
image_index = 0;
canattack = 1;
}
</string>
</argument>
</arguments>
</action>
</event>
<event eventtype="2" enumb="1">
<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>alarm[1] = 90 + random(220);
if (active == 1 &amp;&amp; state == 1 &amp;&amp; target == 0) {
state = 2;
image_index = 0;
}
</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>alarm[0] = 60 + random(120);
if (active == 1 &amp;&amp; state == 1) {
state = 4;
image_index = 0;
}
</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>action_inherited();
enemy_active_check(20);
enemy_target_check(140, 0);
if (active == 1 &amp;&amp; frozen == 0) {
yVel += 0.2;
if (oCharacter.y &lt;= y - 32 &amp;&amp; target == 1) {
jumpheight = -4;
} else jumpheight = -2;
if (state == 4) {
if (image_index &gt;= 3 &amp;&amp; image_index &lt;= 4) {
y -= 1;
yVel = jumpheight - timer / 50;
xVel = 1 * facing;
}
}
if (isCollisionBottom(1) == 1) {
yVel = 0;
if (state == 4 &amp;&amp; image_index &gt;= 5) {
state = 1;
xVel = 0;
}
}
if (isCollisionRight(4) &amp;&amp; facing == 1 &amp;&amp; state == 1) {
facing = -1;
state = 3;
}
if (isCollisionLeft(4) &amp;&amp; facing == -1 &amp;&amp; state == 1) {
facing = 1;
state = 3;
}
if (state == 5 &amp;&amp; image_index &gt;= 4 &amp;&amp; image_index &lt;= 5 &amp;&amp; canattack == 1) {
projectile = instance_create(x, y - 4, oHornoadSpit);
projectile.vspeed = -3;
projectile.hspeed = 6 * facing;
canattack = 0;
}
if (stun == 0) moveTo(xVel, yVel);
} // if (active == 1 &amp;&amp; frozen == 0)
if (state == 100) enemy_death();
if (frozen == 0) {
image_speed = 0.2;
} else image_speed = 0;
if (state == 1) sprite_index = sHornoadIdle;
if (state == 2) sprite_index = sHornoadShake;
if (state == 3) sprite_index = sHornoadTurn;
if (state == 4) sprite_index = sHornoadJump;
if (state == 5) sprite_index = sHornoadAttack;
</string>
</argument>
</arguments>
</action>
</event>
<event eventtype="7" enumb="7">
<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 == 4) image_index = 6;
if (state == 3 || state == 2 || state == 5) state = 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>