JSON File Help and Arrays

0 favourites
  • 2 posts
From the Asset Store
Game with complete Source-Code (Construct 3 / .c3p) + HTML5 Exported.
  • 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.

    ---

    <font size="1">{

         "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"                }]

                             

              }]

              

    }</font>

    ---

    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 ^^

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • 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: scirra.com/forum/rpg-dialogue_topic48392.html

    scirra.com/forum/rpg-dialogues_topic82665.html

    scirra.com/forum/visual-novel-dialogue_topic46779.html

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