How do I Update peer values

Get help using Construct 2

Post » Sat Sep 19, 2015 6:25 pm

Basically what I am trying to do is on one layout the peers select which team they want to be on and then they go to the game layout which the host then has to change them to the team they seleected.

I've tired using global values and other stuff but I can't figure out how to get it where the host knows
who sent the message and to change there value say from 0 to 1 or to 2. There is only two teams in this game
so any ideas or help would be great.

I know I could do something where the host puts everyone into a preset groups but I like the idea of giving the player a choice over forcing them
B
23
S
8
Posts: 115
Reputation: 2,640

Post » Sun Sep 20, 2015 12:26 am

You could just use the send message action of the multiplayer object in a certain syntax to the host, where the host then knows how to get the relevant data and set the teams, then update all clients.
Nothing goes unanswered!
B
24
S
5
G
1
Posts: 434
Reputation: 3,446

Post » Sun Sep 20, 2015 5:56 am

briggybros wrote:You could just use the send message action of the multiplayer object in a certain syntax to the host, where the host then knows how to get the relevant data and set the teams, then update all clients.


Your basically just rewording my question instead of answering it. I know a peer can send a message to the host with the value it needs to change but how doe's the host know who sent the message? Can you show me an example of how this is done?
B
23
S
8
Posts: 115
Reputation: 2,640

Post » Mon Sep 21, 2015 5:06 pm

Image
Nothing goes unanswered!
B
24
S
5
G
1
Posts: 434
Reputation: 3,446


Return to How do I....?

Who is online

Users browsing this forum: charliesan763, JaredX and 12 guests