EditKeep an actor within scene
Basic Idea: This is similar to stopping an actor on collision. Put actors like walls or ground at the edges of your scene.
Sample Game:
http://www.popfly.com/users/team/HowDoI-StopOnEdgesDetails:
See
Stop actor on collision.
Tips:
- Remember that you can resize actors when you place them on a scene. So if you get an actor such as wall that is vertical, you can resize it to look like a horizontal bar.
- You can change the zoom level for the scene to 50% - this will make it easy to put walls at the edges
 Putting walls at edges (Click the image to view full size) |
- Making the walls very thick will help prevent really fast actors passing through them between frames.
- You can place the walls offscreen if they are not really part of the game and you do not want them to be very obvious. As long as they are solid and heavier than the actor, they will stop the actor from going off-screen.