I noticed that upon restarting a layout, the instance variables of a dictionnary wouldn't be reset to their original values.
I've tried making a capx from scratch, triggering every reset action I found on a keypress (persisted object, layout and global variable), but the changes made to the dictionnary's variable would survive everything...
Did I miss something ?
Develop games in your browser. Powerful, performant & highly capable.
There must be an action where you set the dictionary content, right?
But if you are talking about resetting the instance variables of a global object (Dictionary is usually set to global), you should make actions for that..
Global objects keep their values, because they are global..
Maybe you could do:
Dictionary -> Destroy
System -> Create object [Dictionary]
for a quick but dirty way to 'reset' the values.
"Usually" set to global ?
Ho, thank, I never noticed that little subtlelty in objects being able to be global or not. In my case that's fixing my problem.
Now you say "global" though, there's one thing still poking my mind: how comes we have an action to reset global variables but not global objects ?
You can use use "for each value" -> "delete: dictionnary.ActualKey"