How do I carry over multiplayer group between layouts?

Get help using Construct 2

Post » Tue May 03, 2016 7:44 pm

So I'm trying to develop a multiplayer game, and before actual gameplay is a lobby where up to 4 players can join simultaneously before proceeding onto the action. How do I get it so that all connected players move on to the same layout after this lobby layout?
B
8
S
1
Posts: 60
Reputation: 574

Post » Tue May 03, 2016 11:17 pm

Have the host send a message to trigger changing layout on all the peers.
Then in the new layout, set it up as the tutorial describes where objects are created and assigned to peers.
Mistakes were made.
B
52
S
26
G
108
Posts: 1,606
Reputation: 61,133

Post » Tue May 03, 2016 11:52 pm

oosyrag wrote:Have the host send a message to trigger changing layout on all the peers.
Then in the new layout, set it up as the tutorial describes where objects are created and assigned to peers.

How do I go about the first part?
B
8
S
1
Posts: 60
Reputation: 574

Post » Wed May 04, 2016 2:56 am

OK so I may be wrong but, following the multiplayer tutorial it shouldn't be too hard I am working on the same thing its not going to be layout to layout in essence. It will basically have to be from one game to another, ( this is if you are wanting them to be connected to both the "main lobby" and the game or lobby at the same time. Basically you would name your lobby connecting to the server as one name then name your game table another name thus they would not disconnect from both or either or until disconnected from that instance.
B
83
S
9
G
1
Posts: 30
Reputation: 3,941

Post » Wed May 04, 2016 3:40 am

Image

Here is an example.

You will use the action Multiplayer: Broadcast Message for the host, and the condition Multiplayer: On Peer Message or On Any Peer Message for the peers.

Edit: I'm actually not sure myself how changing layouts interact with object syncing, maybe someone else who has experience regarding this can chime in.

Changing rooms is also an interesting idea, but I think re-associating peerIDs to the correct people could possibly cause a lot of headaches and problems. I assume the peerIDs will change upon entering a new room.
Mistakes were made.
B
52
S
26
G
108
Posts: 1,606
Reputation: 61,133

Post » Wed May 04, 2016 3:46 pm

oosyrag wrote:Image

Here is an example.

You will use the action Multiplayer: Broadcast Message for the host, and the condition Multiplayer: On Peer Message or On Any Peer Message for the peers.

Edit: I'm actually not sure myself how changing layouts interact with object syncing, maybe someone else who has experience regarding this can chime in.

Changing rooms is also an interesting idea, but I think re-associating peerIDs to the correct people could possibly cause a lot of headaches and problems. I assume the peerIDs will change upon entering a new room.

What is the condition I place to get the Multiplayer.Message = "start"? Trying to look through the system conditions but not sure which.

Thank you for your help, also.
B
8
S
1
Posts: 60
Reputation: 574

Post » Wed May 04, 2016 5:09 pm

System compare two values. You might not even need that, if you use a message tag that is unique.
Mistakes were made.
B
52
S
26
G
108
Posts: 1,606
Reputation: 61,133

Post » Wed May 04, 2016 5:56 pm

oosyrag wrote:System compare two values. You might not even need that, if you use a message tag that is unique.

Image
Tried assigning it as a button the host must click, doesn't seem to do anything.
B
8
S
1
Posts: 60
Reputation: 574

Post » Wed May 04, 2016 8:27 pm

In your screencap it looks like they are both subevents for something else, did you split the host and peer groups? The message received event needs to be in a peer group,and the host will also need its own action to go to the new layout.

Here is an example. Tested by previewing and duplicating a couple tabs/windows.

https://www.dropbox.com/s/sjtjilffjvtdu ... .capx?dl=0
Mistakes were made.
B
52
S
26
G
108
Posts: 1,606
Reputation: 61,133

Post » Wed May 04, 2016 9:39 pm

Message: Poxnixles can only post plain text URLS until they have 500 rep. 1 URLS modified. Why?
oosyrag wrote:In your screencap it looks like they are both subevents for something else, did you split the host and peer groups? The message received event needs to be in a peer group,and the host will also need its own action to go to the new layout.

Here is an example. Tested by previewing and duplicating a couple tabs/windows.

https://www.dropbox.com/s/sjtjilffjvtdu ... .capx?dl=0

Nah, they were just under a group. Your example is really helping, I'll let you know if I run into any other problems!
B
8
S
1
Posts: 60
Reputation: 574

Next

Return to How do I....?

Who is online

Users browsing this forum: brunopalermo, busydude and 34 guests