-
Notifications
You must be signed in to change notification settings - Fork 8
Variables
You can store game objects in variables, allowing reuse of that game object. This is particularly useful for objects that have a specific identity and relationship with the game state; in particular, basically anything with a sprite: Actor and Item, or for objects that are hidden in an object's variable list.
All variable names start with "@".
The three ways of assigning variables are as follows:
where <command> is a command that generates something:
-
usewill return the result of the method call. -
spawnwill return the mob that is created. -
givewill return the item that is created. -
setwill return the trap that is created.
This allows direct reuse of that object in future use commands or as a method argument, bypassing the limitation of one method per command.
Typing cell or (c) will have the game prompt you to select a tile. You can store the corresponding map index of the cell, or you can store anything else that is on the cell (characters, blobs, heaps)
Typing inv or i has you select an item from the bag to store in a variable.