How do I Send value to host?

0 favourites
  • 5 posts
  • What i'm trying to do is send the host a message with a value.

    On LMB Clicked > Send message to host > Message "UID"

    It tells me it can't send a value only a string so my question is how do you send a value to the host?

    More Details:

    I have multiples of the same item in the game so I'm using the UID system instead of sync values.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • bump

  • bump 2

  • If necessary, you can convert a value to a string using the str() expression and a string back into a value using the int() expression.

    Generally speaking, sync is the probably the more proper way method for send values - either via instance variable, or inside a data object like an array or dictionary. That is more for host->peer data though. I think it is not common practice for peers to send anything besides input values to the host, unless you don't care about having an authoritative host, but that's up to you. Having an authoritative host keeps things much cleaner logically in terms of peer/host events (or at least it does for me).

  • If necessary, you can convert a value to a string using the str() expression and a string back into a value using the int() expression.

    Generally speaking, sync is the probably the more proper way method for send values - either via instance variable, or inside a data object like an array or dictionary. That is more for host->peer data though. I think it is not common practice for peers to send anything besides input values to the host, unless you don't care about having an authoritative host, but that's up to you. Having an authoritative host keeps things much cleaner logically in terms of peer/host events (or at least it does for me).

    Thank you for the help. As you can tell from the bumps I been stuck on this problem for a little bit now.

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