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/oEndingHornoad.object.gmx

247 lines
6.1 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>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>//Init
timeline_index = timelineHornoad;
timeline_position = 0;
timeline_running = true;
timeline_loop = false;
phy_rotation = 0;
phy_fixed_rotation = true;
image_speed = 0.1;
jumpRight = 0;
jumpLeft = 0;
turnRight = 0;
turnLeft = 0;
jumpTime = 0;
turnState = 0;
lastimg = 0;
hornoadBlink = 0;
jumpRightFast = 0;
</string>
</argument>
</arguments>
</action>
</event>
<event eventtype="3" 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>///Hornoad movement
//Hopping Right
if(jumpRight == 1 &amp;&amp; sprite_index == sHornoadJump &amp;&amp; floor(image_index) == 3)
{
physics_apply_local_impulse(0, 10, 15, -50);
physics_apply_torque(0);
jumpRight = 0;
}
if(jumpRightFast == 1 &amp;&amp; sprite_index == sHornoadJump &amp;&amp; floor(image_index) == 3)
{
physics_apply_local_impulse(0, 10, 14, -45);
physics_apply_torque(0);
jumpRightFast = 0;
}
//Hopping Left
if(jumpLeft == 1 &amp;&amp; sprite_index == sHornoadJump &amp;&amp; floor(image_index) == 3)
{
physics_apply_local_impulse(0, 10, -15, -50);
physics_apply_torque(0);
jumpLeft = 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>///Hornoad animations
//Change to idle when landing
if(sprite_index == sHornoadJump &amp;&amp; image_index &gt;= 5 &amp;&amp; place_meeting(x, y+1, oEndingSolid)) {
PlaySoundMono(sndHornoadLand);
sprite_index = sHornoadIdle;
image_index = 0;
image_speed = 0.1;
}
//Turning left
if(turnLeft == 1) {
image_speed = 0.12;
sprite_index = sHornoadTurnNew;
image_index = 0;
turnLeft = 0;
}
//Turning left end
if(sprite_index == sHornoadTurnNew &amp;&amp; image_index &gt;= 2 &amp;&amp; turnState == 0) {
sprite_index = sHornoadIdle;
image_index = 0;
image_xscale = -1;
image_speed = 0.1;
}
//Turning right
if(turnRight == 1) {
image_speed = 0.12;
sprite_index = sHornoadTurnNew;
image_index = 0;
image_xscale = -1;
turnRight = 0;
turnState = 1;
}
//Turning right end
if(sprite_index == sHornoadTurnNew &amp;&amp; image_index &gt;= 2 &amp;&amp; turnState == 1) {
sprite_index = sHornoadIdle;
image_index = 0;
image_xscale = 1;
image_speed = 0.1;
turnState = 0;
}
if(jumpTime &gt;= 0.999999999) {
sprite_index = sHornoadJump;
image_index = 0;
image_speed = 0.2;
jumpTime = 0;
}
if(hornoadBlink == 1 &amp;&amp; sprite_index = sHornoadIdle &amp;&amp; image_index &gt;= 5)
{
sprite_index = sHornoadShake;
image_index = 0;
image_speed = 0.2;
hornoadBlink = 0;
}
if(sprite_index == sHornoadDeath &amp;&amp; image_index &gt; 3)
{
image_speed = 1/2;
}
if(sprite_index == sHornoadDeath &amp;&amp; image_index &gt; 19)
{
image_speed = 0;
}
</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>
//Freeze jump sprite on last frame
if(sprite_index == sHornoadJump)
{
image_index = 6;
image_speed = 0;
}
if(sprite_index = sHornoadShake)
{
image_speed = 0.1;
sprite_index = sHornoadIdle;
image_index = 0;
}
</string>
</argument>
</arguments>
</action>
</event>
</events>
<PhysicsObject>-1</PhysicsObject>
<PhysicsObjectSensor>0</PhysicsObjectSensor>
<PhysicsObjectShape>1</PhysicsObjectShape>
<PhysicsObjectDensity>0.5</PhysicsObjectDensity>
<PhysicsObjectRestitution>0</PhysicsObjectRestitution>
<PhysicsObjectGroup>1</PhysicsObjectGroup>
<PhysicsObjectLinearDamping>0.100000001490116</PhysicsObjectLinearDamping>
<PhysicsObjectAngularDamping>0.100000001490116</PhysicsObjectAngularDamping>
<PhysicsObjectFriction>0.5</PhysicsObjectFriction>
<PhysicsObjectAwake>-1</PhysicsObjectAwake>
<PhysicsObjectKinematic>0</PhysicsObjectKinematic>
<PhysicsShapePoints>
<point>0,0</point>
<point>23,0</point>
<point>23,21</point>
<point>0,21</point>
</PhysicsShapePoints>
</object>