View Single Post
Compare Position
Junior Member
XenElement's Avatar
Status: Offline
Posts: 3
Join Date: Dec 2011
Default Compare Position - 12-24-2011, 12:01 PM

This may be a stupid question, but I'm having a heck of a time finding the answer to it. How do I compare position using an if statement? I'm creating a false 2D game, and I need to know when the hero has gone off the camera's view, of out of the bounds of the stage. I know what the values are for the edges of the camera, but I can't seem to figure out how to compare the hero's position to those single values using an if statement.

My real objective is to teleport the hero to the other side if he goes off the screen, just like asteroids, so if anyone has a better method of doing that, please let me know.
Reply With Quote