How to lock a scrolling actor into place.
As_Of_Latte
Member, BASIC Posts: 343
Everyone has been so helpful and on a roll today, thank you! I just have one more question that needs guidance
I have several actors that scroll up and down (list style), within a scene. Currently, to stop the actors from scrolling endlessly, I have an invisible "stop actor" set above and below my scene...with all my scrollable actors in between. I have the scrollable actors set to collide with either the above or below "stop actors" to stop the scrolling motion.
This seems to work, however there is a bit of a bounce when they collide. What I would rather do is have my scrollable actors snap into place when they reach a specific position on the scene.
Anyone know how to go about this?
Thanks in advance!
Comments
I'm not sure how exactly you have things set up but instead of using a collide to restrict your scrolling you could use code. You must have a Rule somewhere that is allowing the scroll up and down, add a new condition to these Rules to restrict the scrolling.
For example if you didn't want something to scroll beyond Y position 100 you would use a condition like:
If self.Position Y < 100 allow the actor to scroll up
http://jamie-cross.net/posts/ ✮ Udemy: Introduction to Mobile Games Development ✮ Learn Mobile Game Development in One Day Using Gamesalad ✮ My Patreon Page
@jamie_c Thank you for the response! I'll give this a shot today. What you have said makes perfect sense