Hi there.
I'm having some trouble with getting my sprite to get teleported back to a checkpoint when it dies without ending up jammed into the side of the screen?
Is there a way I can make my sprite stay in the middle of the screen after changing the scroll x position of it?
Offline
The magic of ScrollX is that you use it to move all of the other sprites.
If you use it to modify the sprite the player controls there's going to be a problem.
Think of the 480x360 screen as a viewport and that by modifying the x/y position of the other sprites using ScrollX and ScrollY you generate a movement of the environment while the player's sprite stays perfectly still.
Last edited by dechan (2013-01-29 12:50:53)
Offline
I believe our esteemed colleague ErnieParke has answered these questions before
Check this thread
What's important to remember is that backgrounds are really sprites so moving them vs. moving an enemy is just an issue of scale. The mechanics of using ScrollX/ScrollY are the same.
Last edited by dechan (2013-01-29 16:06:29)
Offline