Constraining something to what so I can where?
iDeveloperz
Member Posts: 1,169
Im confused.
How do I constrain an integer to an actors position? So the integer changes as the actor changes?
How do I constrain an integer to an actors position? So the integer changes as the actor changes?
Comments
""You are in a maze of twisty passages, all alike." - Zork temp domain http://spidergriffin.wix.com/alphaghostapps
main_actor_x
main_actor_y
Then on your main actor;
constrain attribute main_actor_x to self.positionX
constrain attribute main_actor_y to self.positionY
Then all other actors can access the main actors position by saying for example - move to main_actor_x and main_actor_y
If that doesnt work then you may need to turn the constrain round so its;
constrain attribute self.positionX to main_actor_x
constrain attribute self.positionY to main_actor_y
Cant remember what way round it is. lol.
I tried to do them both together. Thanks for the reply though.