The Dictionary object stores strings and numbers. Each value has an associated key, which is a string. It is a data storage object - it does not do any spell checking or language-specific features.
Key names in the Dictionary object are always case sensitive. This means the key "SCORE" is considered different to the key "score".
Suppose the number 100 is stored with the key "score", and the string "Joe" stored with the key "name". The result storage looks like the following table:
Retrieving the key "name" with Dictionary.Get("name") returns "Joe", and retrieving "score" likewise returns 100. Setting "score" to 50 will change the value for the key.
This is like storing data in instance variables or event variables, but since you can use strings as keys you can store any number of values.
Compare the value stored for a key.
Check if a key exists in storage.
True when there are no keys in storage.
For each key
Repeat the event once for each key in storage. The CurrentKey and CurrentValue expressions return the current key and its value respectively.
Compare current value
Only valid in a For each key event. Compare the value of the current key.
Add a new key to storage, with a given value. If the key already exists, its value is updated.
Remove all keys from storage, making the object empty.
Remove a key and its value from storage. If the key does not exist, this has no effect.
Update the value for a key which already exists. If the key does not exist, this has no effect. (Unlike Add key, the key will not be created.)
Invokes a browser download of a file containing the Dictionary's contents in JSON format. This is intended for offline development, e.g. creating level editors.
Load all keys and values from JSON data previously retrieved from the Dictionary object using either the Download action or the AsJSON expression.
Return the value stored for a key, e.g. Dictionary.Get("score"). If the key does not exist, it returns 0.
Return the number of keys in storage.
In a For each key event, these return the key and its value (respectively) for the current key being iterated.
Return the contents of the Dictionary object in JSON format. This can be later loaded back with the Load action, sent to a server via AJAX, saved to disk, and so on.