Show Hide Statement - ellis-matthew4/XDL GitHub Wiki
There are two legal syntaxes for the Show statement:
show [Character] [Animation] at [Position]
//AND
show [Character] [Animation] [Position]
The only difference between the two is the subtraction of the "at" keyword. In a show statement, "at" is automatically discarded at compile time, so it only exists to make your code a little prettier and is completely optional. A show statement compiles into the Dialog dictionary as follows:
show harry sad (at) left
dialog[index] = { "action": "show", "pos" : "left", "char" : "harry", "emote" : "sad" }
This moves Characters[dialog[index]["char"]] to Positions[dialog[index]["pos"]] and sets the animation of the AnimatedSprite to [dialog[index]["emote"]]. In easier terms, it changes the animation of the specified Character to the correct Animation, then moves it to the specified position.
The hide statement only has one valid syntax:
hide [Character]
This is a single-instruction command, but it compiles as follows:
hide harry
dialog[index] = { "action" : "hide", "char" : "harry" }
This command sets that Character's visibility to false, and moves it back to (0,0)