Need help displaying text from an INI file group/item

This forum is currently in read-only mode.
From the Asset Store
Game with complete Source-Code (Construct 3 / .c3p) + HTML5 Exported.
  • Hi everyone,

    I've just begun working on the dialogue system for my game and will be using INI files to store the text for dialogue. I need to display text with the text object from an ini file but am having no luck. Would anyone be kind enough to make a quick example?

    thanks

  • http://files.getdropbox.com/u/646697/Lucid.zip

    I whipped this a few days ago.

  • i gotta tell you aeal, you have great taste in filenames

  • Try Construct 3

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

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

    INI.ItemString("group", "item")

    There's an article on the Wiki if you want a full overview of the object.

  • Personally I like hash tables better than INIs--INIs have very strict formatting rules, whereas hash tables are just tables.

    EDIT: This makes no sense, what I wrote. I just believe hash tables are simpler. I'd use a hash table for dialogue--but I'd use an INI for settings or maybe even saved games.

  • Why not just use the timeline object for dialogue?

  • hash tables are ok but even then you nee to use an editor to edit the values. With an .ini file you can simply type it up in the correct format which IMO is much easier than using a special hash table editor Especially when using it for things like story I would rather use note pad and have to format it correctly than program my own editor.

    uber lou because when doing large stories its easier to use an out side file and edit that than a bunch of internal text files.

  • Aeal: That may be true, but you don't need a bunch of internal text files, just use one global timeline object. Organize each cinematic, or chunk of text, into a timeline within that object and its pretty manageable. I have a lot of in game dialogue and I found it easier to use than an ini file. Maybe just preference.

  • Thanks Aeal,

    I needed to so something slightly different, but it definatly helped. It turns out All I needed was to put quotation marks around my group name and item name.

    PS. I love the easy of use of ini files in text editors, and like the fact that its an external file in this case becuase I'll be encouraging users to make translations into other languages. (simply sawp the few ini files to the ones in your language)

  • Holymonkey if ya need help with INIs more you can pm me as I think im pretty good with em

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