player.max_x = 584-player.xoffset player.min_x = 16-player.xoffset If MouseX()+player.xoffset < player.min_x Then MoveMouse(player.min_x,MouseY()) If MouseX()+player.xoffset > player.max_x Then MoveMouse(player.max_x,MouseY())
As you can see, I'm using mouse control... The control works fine itself. But when I have 2 playerships you're controlling, I need to add an xoffset to one of the ships so they dont overlap each other. The problem is, one of the ships will go off screen. To fix this I figured I'd apply the xoffset on the mouseX if check. But it's not working.
Symptoms:
Ship with offset applied to it still goes too far right.