TOUR
PRICING
HELP
Stencylpedia
Blocks Guide
Sample Games
Developer Center
FORUMS
CHAT
#MADEINSTENCYL
EDUCATION
SIGN IN
×
Welcome back!
Username or E-mail
Password
(
Forgot?
)
C
OMMUNITY
Home
Issue Tracker
Inbox [0]
New Posts
New Replies
Search
Stencyl Community
→
Stencyl
→
Ask a Question
→
Synched Character Movement?
Pages:
1
Synched Character Movement?
Tacophobia
Posts: 8
April 26, 2012, 09:50:39 pm
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
April 26, 2012, 10:22:31 pm
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
April 27, 2012, 08:36:55 am
Sorry but I don't really understand...
Anyway you can make that a bit more noob friendly?
Abigayl
Posts: 807
April 27, 2012, 08:59:31 am
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
Pages:
1