0 Favourites

How do I Include Variables in my JSON data

  • Greetings, I'm working on producing a JSON to populate my game with text.

    So far it's going good, but one of the problems I'm having is that I can't find a way to include variables in my JSON.

    Basically I want this =

    "The Game has arrived, which is good because " & DicCharStats.Get("WRS") & " brought their controller."

    To come out : The Game has arrived, which is good because [character name] brought their controller.

    It works in general, but when I add it to a JSON (Setting a new string), it converts it to:

    "The Game has arrived, which is good because 0 brought their controller."

    Obviously it then comes out of there exactly like that.

    I was thinking of doing a workaround, where something like *Character* in the text would represent that it would need to be replaced with " & DicCharStats.Get("WRS") & " when it was printing the text, but I haven't found the functionality in system, and haven't found a plugin that does what I want.

    Anyways, thanks for any help ideas, this is the plugin I'm using for JSON right now:

  • Construct 3

    Buy Construct 3

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

    Buy Now Construct 3 users don't see these ads
  • Bump, please help!

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