JSON File Help and Arrays

Get help using Construct 2

Post » Thu Feb 13, 2014 4:43 am

Hello ^^

So I'm trying to use the JSON file to put all the dialog of the game I'm making into an array within Construct.
---
{
     "dialog":[{
          "dialog_ID":[{
               "root_convo1":{
                    "c01prol":"...",
                    "c01prol":"...where am i now?",
                    "c01prol":"I don't remember this place"
               },
               "root_convo2":{
                    "c01_01":"..hee....hello...can anybody hear me?",
                    "c01_02":"..is anybody receiving this transmission?"
               
               }
          }],
          "tutorial_ID":[{
               "tutorial_01":[{
                    "tut01_01":"Press to move",
                    "tut01_02":"Press to menu"
               }]
                         
          }]
          
}

---
I'm trying to put these ID's so that I know which dialog i need to pull out for certain instances. However, I don't know if this is advisable to do since it is nested.

Is it still okay to pursue this nested array, or should I separate a file for each different use. If I can still use the nested JSON arrays, is there a certain method I can do so it can be read up until the innermost values of the nested array? Thank you very much ^^
B
8
Posts: 35
Reputation: 388

Post » Thu Feb 13, 2014 6:12 am

I haven't dealt with this personally. However, I've read some threads where different approachs to dialouge were discussed, pros and cons, etc. If you have a lot of dialouge, things can get complicated. There's really no one way to go about it; basically, you might want to read up on it first.

You might find these useful:

See Kyratic's second post, and links: http://www.scirra.com/forum/rpg-dialogue_topic48392.html

http://www.scirra.com/forum/rpg-dialogues_topic82665.html

http://www.scirra.com/forum/visual-novel-dialogue_topic46779.html
Don't lose your work. Backup your game with Dropbox.
B
44
S
10
G
10
Posts: 1,106
Reputation: 9,202


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 23 guests