How do I Include Variables in my JSON data

Get help using Construct 2

Post » Sun Aug 23, 2015 12:52 am

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:
plugin-json-import-export-generate-edit-inspect_t100042
B
9
S
2
Posts: 54
Reputation: 638

Post » Sun Aug 23, 2015 8:30 pm

Bump, please help!
B
9
S
2
Posts: 54
Reputation: 638


Return to How do I....?

Who is online

Users browsing this forum: pegasus6464 and 27 guests