[Multiplayer] How do I synchronize animations?

Get help using Construct 2

Post » Mon Apr 07, 2014 9:09 pm

Hello everyone,

I'm working with the multiplayer plugin, but I cannot figure out the animations.
Currently I have 2 players A(host) & B(Client).

The sprite animations in the host work fine.
However in the Client, the animations from "A" (host) are not working fine.

I'm using the getbit/setbit instructions.
It seems that the animations are not synchornize with Sync:Object (only the position) and these needs to be set differently, am I right?

Regards
Image
Image
B
26
S
2
G
1
Posts: 71
Reputation: 2,662

Post » Mon Apr 07, 2014 9:27 pm

Don't bother. Start and stop animations when the client recieves the approrpriate action. But unless there is a serious need for it. Don't. 99% of games don't bother. The start/stop of an action is good enough and with latency there is no way you will ever get a 100% animation sync,
B
90
S
18
G
9
Posts: 2,455
Reputation: 15,013

Post » Mon Apr 07, 2014 10:46 pm

umm I think I did not explain clearly.

The problem that I have is the animation is not starting for example I have this:

getbit(sprite.inputs,0)==1 Set Animation "animation01" (play from beginning)

(This is following the multiplayer game example).

But the animation is not starting.
Image
Image
B
26
S
2
G
1
Posts: 71
Reputation: 2,662

Post » Sat Aug 23, 2014 4:33 pm

@Dakiu

Did you find a solution for this? I'm having the same problem understanding the menchanism.
B
14
S
2
G
1
Posts: 53
Reputation: 850

Post » Mon Aug 25, 2014 1:55 pm

Gougth wrote:@Dakiu

Did you find a solution for this? I'm having the same problem understanding the menchanism.


Yes, as far as I remember, I just updated the animations only in the host I mean the Start Animation.

This worked for the client.
Image
Image
B
26
S
2
G
1
Posts: 71
Reputation: 2,662

Post » Mon Aug 25, 2014 2:04 pm

Dakiu wrote:getbit(sprite.inputs,0)==1 Set Animation "animation01" (play from beginning)

This will restart the animation from the beginning every tick while the bit is set, so it will never advance beyond the first frame, making it look like it is not playing. Either play from the current frame or only set the animation the first time it is true.
Scirra Founder
B
387
S
230
G
87
Posts: 24,249
Reputation: 192,240

Post » Fri Feb 20, 2015 12:50 pm

Hi all i Want to find the code for set animation Multiplayer for host and Client, i have the same problem of dakiu...
Please worker Help ours With a good cap x of THIS

;)

Like all

Sphxrprod
B
11
S
1
Posts: 28
Reputation: 1,963

Post » Fri Feb 20, 2015 12:53 pm

exka wrote:Hi all i Want to find the code for set animation Multiplayer for host and Client, i have the same problem of dakiu...
Please worker Help ours With a good cap x of THIS

;)

Like all

Sphxrprod
B
11
S
1
Posts: 28
Reputation: 1,963


Return to How do I....?

Who is online

Users browsing this forum: davidbox, Mayfly, Yahoo [Bot] and 6 guests