Multiplayer scroll to their own peer

Get help using Construct 2

Post » Fri Apr 17, 2015 8:44 pm

All I have is every tick - system scroll to peer

it worked fine when testing, and the very first time it went live. Now the peers can only see the host but can still move/shoot. Is there more code that needs to be done to make sure it stays on host?
B
9
S
2
Posts: 37
Reputation: 729

Post » Fri Apr 17, 2015 9:20 pm

Image


This is how scroll to works for each peer in my game
B
10
S
1
Posts: 57
Reputation: 639

Post » Fri Apr 17, 2015 10:05 pm

Tryitoutkris wrote:Image


This is how scroll to works for each peer in my game



Thank you, seems to be working so far. Testing my game with a lot of people today so I'm trying to get out all of the major issues I haven't been able to fix on my own.
B
9
S
2
Posts: 37
Reputation: 729

Post » Sun Apr 19, 2015 6:12 am

Good deal, I was wondering if you could post how you create and destroy objects for peers?
B
10
S
1
Posts: 57
Reputation: 639

Post » Sun Apr 19, 2015 3:52 pm

Tryitoutkris wrote:Good deal, I was wondering if you could post how you create and destroy objects for peers?



That's last on my list for my game so I'm not there yet. I'm trying to work around it as much as I can but I imagine for something like pressing a button to open a door (destroy a door) I would try

Under Host event sheet

For each peer
multiplayer.id = peerid:
peer.x, peer.y = buttonsprite.x, buttonsprite.y THEN set (buttonsprite isntance variable) "pressed" to one.

Under common
Buttonsprite "pressed" = 1 THEN destroy door




We'd have to sync the variable just like the peers have synced variables though. I'm still getting the hang of it.

Also I found this by Ashley which is probably more helpful:

Use 'Sync object' to sync the (objects you want destroyed), and then destroy them on the host. When synced objects are destroyed on the host, the syncing automatically destroys them on all of the peers as well. So you don't even need to send any special messages or have any special flags.
B
9
S
2
Posts: 37
Reputation: 729


Return to How do I....?

Who is online

Users browsing this forum: bangoo and 9 guests