This site requires JavaScript, please enable it in your browser!
Greenfoot back
GaijinVagabond
GaijinVagabond wrote ...

2018/7/24

Side Scroll

GaijinVagabond GaijinVagabond

2018/7/24

#
How would I make a scenario in which the screen scrolls once an actor reaches a certain point on the x axis (similar to super mario)?
Super_Hippo Super_Hippo

2018/7/24

#
Basically, you need to differentiate between objects which scroll, objects which should be fixed on the screen (for example score displays) and the object which causes the scrolling. When you add an object to the world, you add it to a scrolling or non-scrolling list. Whenever the object which is causing the scrolling reaches a certain point on the x-axis, you move all objects in the scrolling-list (and the object itself) to the side. You could look at this scenario from danpost: http://www.greenfoot.org/scenarios/19020
You need to login to post a reply.