How do I past a static variable to each peer

Get help using Construct 2

Post » Thu Mar 27, 2014 12:47 pm

Hi all,

I need help (again)… I think there is a basic knowledge I don’t understand.
I’m trying to make simple multiplayer game : 3 sqare (then 3 peers) which have car behavior.
It works good.

Now I would like to broadcast an information (player number) to each peer as is it done in tuto 3 “Real Time Game” with the statistic above the peer (health, kills…). So The second peer know which is the 1st, thierd peer..)

The difference with tuto3 is that my variable to update on each peers is not “real time” variable, I mean the value of this variable is set one time on peer when it is created and not modified after.
So if I understand the tuto, for this kind of transfer, no need to use sync object as is it done in tuto 3 with health for example. The send/broadcast message must be sufficient.
Am I right on this point?

So I’m looking on the tuto2 Chat room, but I can’t do what I want.

Host block:
When a peer connect I use broadcat function:
Broadcast tag “majnum” message variable_num (from Multiplayer.fromID, mode ….)

Peer block: (I want to affect the variable receive to the right peer)
On peer message “majnum”  set instance variable from Multiplayer.fromID to variable_num

Common block:
Everythick: Set num player above each peer object
(For each??)

I think I don’t understand well the multiplayer syntax…

Sorry for this explanation a little bit complex.

Posts: 10
Reputation: 595

Return to How do I....?

Who is online

Users browsing this forum: No registered users and 21 guests