Refer title. I’m not sure to just put the file on GitHub since it’s not a bug, so I’ll put the zip on my Google Drive instead, which will be at the end of the post.
I didn’t find any mention for saving in the dialogue example tutorial, but if there’s one and I missed it, do notify.
Also long post because pictures.
To start: I’ve managed to implement storage function, and created an event to save dialogue state into global variable, then into Storage event. However the data isn’t actually being saved?
(This is from GDevelop Preview. GDJS_hiScore is from another game, which successfully reads the data into variable)
Okay, now details of my code:
Here’s my code to save into storage and deleting it:
Here’s the dialogue, it starts at NPC0 and the dialogue variable is “choice1”. I set it to True if player picks first choice. False if second, and NPCNameStart is third choice, just text.
I’m not sure what else to add.
The wrong part could be the saving(text/value) or the Load and Save dialogue state actions I did.
The link (Investigations.zip): wip - Google Drive
It’s a folder, and anyone can edit it.
The dialogue file is in language/english.json.
The controls are WASD movement, E to talk (transparent blue collide with white npc), R to get out of dialogue freezing (I haven’t finished the dialogue system yet), T to save data into storage, and Y to clear storage (however if data is already loaded you’ll need to restart to clear global variables and dialogue state).
Esc to close the game (if it hasn’t crashed yet).
Thank you for reading and even more so if you can help!
PS: If you are looking how to do this, sorry! I will post the method at some point later. It involves structures (see link)and the Yarn command syntax. Just bump the topic if you’re interested (I may forget to elaborate this, I guess)