I have a game a bit like doodle jump and i want the screen to scroll. i have a variable called scrolly and have practically finished the game, i just need a script which will scroll up when the sprie gets to the top! An Help?????
Offline
you could give each sprite a variable specific to that sprite; it would be it's Y position except it will not be its position on the screen, it will be its position in the world.
Every sprite will need something like this:
set [yPos v] to [some number]
when gf clicked
forever
if < ([abs v] of ((yPos) - (scrolly)) ) < ((180) + ((WidthOfSprite) / [2])) >
go to x: (x position) y: ((yPos) - (scrolly))
show
else
hide
end
then all you have to do is set for every sprite a yPos value and set where the scrolly is with controls or triggers.
Offline