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

108 lines
3.5 KiB

<!--This Document is generated by GameMaker, if you edit it by hand then you do so at your own risk!-->
<object>
<spriteName>sBlockBomb</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>setCollisionBounds(-8, -8, 8, 8);
makeActive();
state = 0;
falling = 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 (state == 0 &amp;&amp; falling) {
if (isCollisionBottom(5) == 0) yVel += 0.1;
if (isCollisionBottom(5) &gt; 0) {
if (yVel &gt; 0) yVel *= -0.4;
if (abs(yVel) &lt; 0.3) yVel = 0;
if (collision_line(round(lb), round(bb + 4), round(rb - 1), round(bb + 4), oSlope1, true, true) &gt; 0) {
xVel -= 0.5;
yVel *= 0.5;
}
if (collision_line(round(lb), round(bb + 4), round(rb - 1), round(bb + 4), oSlope2, true, true) &gt; 0) {
xVel += 0.5;
yVel *= 0.5;
}
if (collision_line(round(lb), round(bb + 4), round(rb - 1), round(bb + 4), oSlope1B, true, true) &gt; 0) {
xVel -= 0.2;
yVel *= 0.5;
}
if (collision_line(round(lb), round(bb + 4), round(rb - 1), round(bb + 4), oSlope2B, true, true) &gt; 0) {
xVel += 0.2;
yVel *= 0.5;
}
xVel *= 0.9;
}
if (isCollisionTop(5) &gt; 0 &amp;&amp; yVel &lt; 0) {
yVel *= -1;
xVel *= 0.9;
}
if (isCollisionRight(5) &gt; 0 &amp;&amp; xVel &gt; 0 || isCollisionLeft(5) &gt; 0 &amp;&amp; xVel &lt; 0) xVel *= -0.8;
xVel = min(xVel, 6);
xVel = max(xVel, -6);
yVel = min(yVel, 6);
yVel = max(yVel, -6);
moveTo(xVel, yVel);
image_angle += xVel * -2;
} // if (state == 0 &amp;&amp; falling)
</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>