min and max...
So i have a block that moves across the screen horizontally at a constant speed, when pressed it follows the mouse. How can i set a minimum and maximum vertical position for this block?
Thanks
Thanks
Comments
Rule: When
attribute self.YourActor.Position X > 30
attribute self.YourActor.Position X < 450
---your preferred moving behaviour
This is for the horizontal limits for an actor moving horizontally, use similar above for vertical movements but using Position.y
----------------------------------------------
http://davidgriffinapps.co.uk/
""You are in a maze of twisty passages, all alike." - Zork temp domain http://spidergriffin.wix.com/alphaghostapps
i've just thought; depending on how your actor is moving, the above might not register. If that's the case, make real attributes, for x and y, call them YourActorX and YourActor Y, for instance; then use a constrain behaviour: constrain attribute myActor X to self.YourActor.Position.x
Then the rule is:
When YourActorX > 30
When YourActorX <450
---your moving stuff.
""You are in a maze of twisty passages, all alike." - Zork temp domain http://spidergriffin.wix.com/alphaghostapps