How do I Sync monsters on multiplayer?

Get help using Construct 2

Post » Mon Nov 03, 2014 8:44 am

Hi, I have trying to sync my monsters on my multiplayer top down shooter. Peers are running around taking damage from monster they they can't see because they exist on the Host. I am not sure how to go about syncing my monsters. My monsters use the Bullet behavior to move.

Thanks, Moochie
B
6
S
1
Posts: 10
Reputation: 429

Post » Mon Nov 03, 2014 2:16 pm

As is normal with 'Sync object' simply use the 'Sync' action on the host only, and create/move/destroy objects on the host only, and they will automatically sync on all peers.
Scirra Founder
B
402
S
238
G
89
Posts: 24,613
Reputation: 195,993

Post » Tue Nov 04, 2014 2:43 am

Cool thanks.

Another question, when peers connect they see 2 copies of the hosts player, only one moves and the one that doesn't move can't be seen by the host, any ideas why?

Thanks
B
6
S
1
Posts: 10
Reputation: 429

Post » Tue Nov 04, 2014 6:10 am

Moochie wrote:Cool thanks.

Another question, when peers connect they see 2 copies of the hosts player, only one moves and the one that doesn't move can't be seen by the host, any ideas why?

Thanks

I speculate that this happen because you did not destroy the default host player on peer side upon joining room as peer. Look at pong example, it shows the simplest way to solve this, for the paddle object.
B
28
S
8
G
4
Posts: 553
Reputation: 4,924

Post » Tue Nov 04, 2014 7:19 am

DuckfaceNinja wrote:
Moochie wrote:Cool thanks.

Another question, when peers connect they see 2 copies of the hosts player, only one moves and the one that doesn't move can't be seen by the host, any ideas why?

Thanks

I speculate that this happen because you did not destroy the default host player on peer side upon joining room as peer. Look at pong example, it shows the simplest way to solve this, for the paddle object.


In signaling I do have the Peer Destroy.
B
6
S
1
Posts: 10
Reputation: 429


Return to How do I....?

Who is online

Users browsing this forum: max2612 and 6 guests