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

114 lines
3.3 KiB

<!--This Document is generated by GameMaker, if you edit it by hand then you do so at your own risk!-->
<object>
<spriteName>sKomaA1</spriteName>
<solid>0</solid>
<visible>-1</visible>
<depth>-100</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>image_speed = 0;
image_index = 4;
state = 1;
if(instance_exists(oCharacter)) {
image_index = 0;
state = 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>if(state == 0) {
if(image_index &gt; 0) image_speed = -0.1;
else {
image_speed = 0;
image_index = 0;
}
if(oSaveStation.image_index &gt; 5 &amp;&amp; image_index == 0) state = 1;
}
if(state == 1) {
if(image_index &lt; 3.9) image_speed = 0.1;
else {
image_speed = 0;
image_index = 4;
}
if(oSaveStation.image_index &lt; 1 &amp;&amp; image_index == 4) state = 0;
}
/*if(state == 0) {
if(image_index &gt; 0) image_index -= 0.1;
}
else if(state == 1) {
if(image_index &lt; 4) image_index += 0.1;
}
//Old behavior
/*if(oCharacter.x &gt;= x-16 &amp;&amp; oCharacter.x &lt;= x+16) state = 0; //Forward
else if(oCharacter.x &gt; x+16) state = 1; //Right
else if(oCharacter.x &lt; x-16) state = 2; //Left
if(state = 0) { //Forward
if(image_index &lt; 4) image_index += 0.1;
else if(image_index &gt; 4) image_index -= 0.1;
}
else if(state = 1) { //Right
if(image_index &lt; 8) image_index += 0.1;
}
else if(state = 2) { //Left
if(image_index &gt; 0) image_index -= 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>0</PhysicsObjectKinematic>
<PhysicsShapePoints/>
</object>