Multiplayer: synced object won't change frames on peer

Get help using Construct 2

Post » Wed Jul 06, 2016 4:03 am

So I'm working on a multiplayer game, pretty much to learn about multiplayer plugin.

To put it simply, I have a synced block that, when I click it on the host, I want it to change it's animation frame on the host and on the peer's screen, but it only changes on the host. It also won't do anything if I change the animation instead of only the frame, I tested it. Maybe I'm doing something wrong?
I know the block is synced because if I change the it's position on the host, it also changes on the peer. Any ideas?

Thanks in advance! :mrgreen:
B
53
S
11
G
6
Posts: 133
Reputation: 8,830

Post » Wed Jul 06, 2016 5:16 am

@siks Hello so this should be simple. Simply make a variable on the block. Then for the condition of clicking on the block make another condition that is "is host". And for a action change the variable change. And make another event when the variable Is changed to whatever you set to change the animation.

Next make one more variable syncing the blocks variable. And it should work. So when the variable is synced on the peers side it will change the animation.

If you are having trouble upload a capx and I'll set it up for you.
B
21
S
9
G
1
Posts: 15
Reputation: 2,055

Post » Wed Jul 06, 2016 5:55 pm

Using a variable worked! Just feels strange having to use a different variable to say the same thing as a value that is already in the object...
B
53
S
11
G
6
Posts: 133
Reputation: 8,830


Return to How do I....?

Who is online

Users browsing this forum: dop2000, lahbach, Waltuo and 28 guests