i want it so that my boss moves in randomally but not to cross the Y axis at 410, and if he hits the edge of the world to go a different way. What is the best way to do this.
Put a small transparent object at each place where the actor is to turn; if your actor moves faster than one pixel per act, use a 'for' loop to move one pixel at a time and check for intersection with transparent object. When object found, turn number of degrees required. For variance, you can specify the number of degrees to turn within the transparent object (or just specify the new direction of travel). If necessary, you can adjust the actor to the location of the transparent object to maintain the same line of travel each time around the path. The 'for' loop is unnecessary if you make the transparent object the size of the move amount of the actor (height and width), if placed close enough to where the actor will end up on a move.