@fremachuca wrote:It would be awesome if you could make a simple "get started" tutorial on how to implement this into another project.
It's certainly the hardest part of this template, getting it to work inside an existing capx! However, when you know what to copy over, it's not that complicated, here's the breakdown of what you should do :
1. Copy these objects to your project (an event-less layout works wonder, like the "Dummy" layout) : ContinueIndicator, PortraitSprite, SpriteFont, WindowFrame
(edit: Version 1.02 now needs additional objects : UpArrow, DownArrow, ChoiceSelector)
2. Create these objects and name them like so :
1 Array Object named "DialogueData"
1 Dictionnary Object named "DialogueDictionary"
1 Dictionnary Object named "DialogueCommands"
1 Dictionnary Object named "GameVariables" (this is where you game should store its variables, so that dialogues can fetch them)
1 Function Object named "Function" (default)
1 Browser Object named "Browser" (default)
1 Audio Object named "Audio" (default)
3. Create a new event sheet, and copy over all the content from the "DialogueEvents" sheet from the template. If all objects were correctly copied / created, it should give no error message. (per @haddy22 's remark, variables should be copied over before other events, so doing it in chunks might be better)
4. Include this new event sheet inside whatever layout where you want to use the system.
5. Be sure to have a "HUD" layer in all your layouts where you need dialogues. (You can also define your own layer by changing the "DIALOGUE_LAYER" constant)
6. You can then initiate a dialogue with the "Dialogue_StartDialogue" function. It will start a dialogue with the data currently in the "DialogueData" array, or you can also provide a "key" parameter, it will then load the dialogue from the "DialogueDictionary" and start it. An AJAX call to retrieve either an array or a dictionnary JSON will most likely be needed.
Please let me know if you need further help !