All scratchers who make scrolling games have this problem. When the sprite is supposedly offscreen it stays at the side. How do you get rid of this? Here's how (this is a script for isometric games that will go for the terrain that the main sprite is walking on
when green flag clicked (when the game starts)
forever start
if 360<y position or -360>y position or x position > 480 or x position < -480
hide
if ends
if not 360<y position or -360>y position or x position > 480 or x position < -480
show
if ends
forever ends
This works because the dimensions of the screen is 480 x 360 which is why the scrolling scripts work to.
Please, if you know this already, please don't say 'oh that's easy' because a lot of people don't
Offline
That works for most sprites, however with more freeform sprites 360 and 480 are not always the maximums for the boundaries. A script that would work for all sprites would be this:
Last edited by Kileymeister_test (2011-12-28 15:01:02)
Offline