Destroyable Objects In MultiPlayer

Get help using Construct 2

Post » Wed Apr 15, 2015 7:54 pm

So each Peer can destroy the NPC
The Npc instant Respawns if the host has not killed it first
New Peers have a NPC on their Screen but not other Peers
I have attacached Screen shots of Old Peer Vs new Peer and the only code in the Cap.x
The Code is under my Common group
I want new peers to not see monsters that are dead atm
Image
B
10
S
1
Posts: 57
Reputation: 639

Post » Sat Apr 18, 2015 7:05 am

It looks like you used synched object for the NPCs,
Therefore the peer needs to inform the host it destroyed the NPC, but not destroy it then and there.

The host gets informed the NPC has died and destroys it, which gets synched back to the connected peers.
Who dares wins
B
53
S
13
G
11
Posts: 1,758
Reputation: 13,830

Post » Sun Apr 19, 2015 6:19 am

Image

this is my current code for this problem, Something is still wrong because the peer can destroy the monster on the host screen but will not destroy on its own screen.
B
10
S
1
Posts: 57
Reputation: 639

Post » Sun Apr 19, 2015 6:43 am

Did you add Sprite (red square) and Skele1 to the synch family ? (so the objects actually get synched)

If not, you would need add them.

I generally do not use families to synch objects (not sure that works effectively), I always use the objects themselves.
Who dares wins
B
53
S
13
G
11
Posts: 1,758
Reputation: 13,830

Post » Sun Apr 19, 2015 7:41 am

They are in the sync family,I have removed them from family and synced them individually but this still resulted in same effect. The creation of the object is synced and the peer can effect the hp of the monster ,destroying it on the host screen but not on the peers.
B
10
S
1
Posts: 57
Reputation: 639

Post » Sun Apr 19, 2015 10:26 am

That is odd, the synching should work both ways.


Can you post a pic of your events where the NPCs gets destroyed ?
Who dares wins
B
53
S
13
G
11
Posts: 1,758
Reputation: 13,830

Post » Sun Apr 19, 2015 3:49 pm

if you look in the above picture the skele is destroyed by the host when its hp = 0. In that above picture all things in red squares are involved
B
10
S
1
Posts: 57
Reputation: 639

Post » Sun Apr 19, 2015 4:31 pm

It appears they are outside the Host group level.

Peers are also creating new ones then it seems.

Move those three events to be below (in) the host group and try again.
Who dares wins
B
53
S
13
G
11
Posts: 1,758
Reputation: 13,830

Post » Sun Apr 19, 2015 6:25 pm

Image

I moved the three events into the Host group, The skeleton now no longer spawns on the peer screen.
B
10
S
1
Posts: 57
Reputation: 639

Post » Sun Apr 19, 2015 6:34 pm

If you post/pm a capx I wouldnt mind taking a look
Who dares wins
B
53
S
13
G
11
Posts: 1,758
Reputation: 13,830

Next

Return to How do I....?

Who is online

Users browsing this forum: Exabot [Bot], totoe and 13 guests