How do I send value in multiplayer message.

0 favourites
  • 2 posts
From the Asset Store
The official Scirra Multiplayer Signalling Server for helping peers find and connect to each other
  • What I'm trying to do is broadcast a message from the host to the peer but not being a string but a value.

    I'll give you an example:

    In my game there is like 10 banks and each bank holds it's own value which players can change around as they play. There is a dedicated host so the host will always have the proper number in each bank but my problem is when a new player joins I need to tell that peer what the value is in each bank but when trying to use the broadcast message and placing a instance value inside of it it tells me it can't send values but must be a string.

    A little more:

    Now I know I could make a crazy system where it changes words into numbers but I feel that is a bit much when you take into consideration that well I'd have to make hundreds of these convert expressions.

    Thank you for your help!

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • The System object already has built in expressions for converting between strings and numbers: int(x), float(x), and str(x). You can check the manual for more info.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)