I need some help about multiplayer object.
I would like to know the best way to make that each peer know his connected number: for exemple host is player: 1, the first peer logged is player: 2, the second peer is player: 3..., and put this value on a instance variable.
I don't find an inbuild variable which cover this.
So, I think create a global variable (integer) and send it from host to peer with "send message" function is a good way.
What do you think?
Is it possible to send an integer in "send message" fonction?
What I've test:
In the host block, On trigger "on peer connected", I use a multiplayer object with "send to peer" fonction (tag=toto), I send the int value of the global variable.
In the peer block, On the trigger "on peer message "toto", I affect the instance variable with multiplayer.message. witch must contain global variable value.
Then the instance variable receive a "nan" value... iven if I force the global variable with STR function before sending.
Thanks for your help.