I'm trying to say "If the playership's velocity = 0 (i.e. stationary), then overlay an image on the playership"
Code: Select all
<ItemType UNID="&itAnimation;"
virtual= "true"
deviceSlots= "0">
<Events>
<OnUpdate>
(setq shipSpeed (objgetVel gPlayerShip))
(if (eq (shipSpeed) 0)
(objAddOverlay gPlayerShip &ovAnimation; (ObjGetPos gPlayership) 0)
)
</OnUpdate>
</Events>
</ItemType>
<OverlayType UNID="&ovAnimation;">
<Effect>
<Image imageID="&rsDummy_left_up1;" imageX="0" imageY="0" imageWidth="48" imageHeight="48" imageFrameCount="2" imageTicksPerFrame="10"/>
</Effect>
</OverlayType>
Any ideas?