VYTIS_KNIGHT wrote:Say I want to do the following.
Move ship right until it gets to 98 then do not allow ship to move any further right.
move ship left until it gets to -98 then do not allow ship to move any further left.
on Key Down Event right
script editor
if( x<98 ) {x=x+5;}
on Key Down Event left
script editor
if( x>-98 ) {x=x-5;}
Also:
If ship is destroyed by enemy shot then create new ship and subtract 1 from ship total. Update total on screen.
you may create a timer when the ship is destroyed that re-create the ship after some time (1000 ms or so)
for the ship counter you may create an actor (let's name it ships) with an animation where each frame show a different number of ships, then subtract 1 to animpos of the actor ships everytime the player's ship is destroyed.
hope this make sense.