Synched Character Movement?

Tacophobia

  • Posts: 8
I'm currently working on a puzzle game that involves playing/moving 2 characters at the same time. Is there a behaviour that could make it so that when one character is stuck behind a wall, the other stops moving too. So basically is there a way to completely synch both characters movements?

Abigayl

  • Posts: 807
You could use a game boolean or number attribute, changing it based on what movement is possible. I'd suggest the game number attribute personally for more flexibility (i.e. set to 0 if movable, 1 if only left, 2 if only right, etc.). You might need to use two of them, one for each player and compare the values.
If you need help, please check my tutorials either here or Kongregate (http://www.kongregate.com/accounts/Abigayl) or come over to my stream: http://www.livestream.com/poweredbyflowers

Tacophobia

  • Posts: 8
Sorry but I don't really understand...
Anyway you can make that a bit more noob friendly? :(

Abigayl

  • Posts: 807
Not really... it's two game number attributes. Call them "Player1" and "Player2" if you want. Then, based on their position, set the number accordingly and only let them move if both attributes allow for that movement. For example, if 0 is any direction and 1 is not left, then if Player1 = 0 and Player2 = 1, then you can move any direction accept left.
If you need help, please check my tutorials either here or Kongregate (http://www.kongregate.com/accounts/Abigayl) or come over to my stream: http://www.livestream.com/poweredbyflowers