Game logic - Global storage – Ylands
Jump to navigation
Jump to search
(Created page with "=Description= Special game logic which serves for storing variables and instructions. Both are accessible from anywhere in the script and used in same manner as local variabl...") |
mNo edit summary |
||
Line 19: | Line 19: | ||
{{Game logic | {{Game logic list}} |
Revision as of 15:34, 7 October 2018
Description
Special game logic which serves for storing variables and instructions. Both are accessible from anywhere in the script and used in same manner as local variables or instructions.
Local instructions
- After creating any local instruction in global storage, you can use it in all other logic's or entity's scripting editor.
Local variables
- After creating any local variable in global storage, you can use it in all other logic's or entity's scripting editor
Events
There are no specific event for global storage.
Global Storage in Use
- Add global storage and create a variable in it. In this case we made a simple variable for the example scenario called "Restart time".
- Create an instruction in it. If you need a changeable part, just add it in by double clicking the green tile of the instruction. In this case we made an instruction which writes remaining time to console and than, in the called time, it restarts the scenario.
- Create another logic or entity and edit its script using previous variables and/or instructions. Here the instruction is used to by triggered by an event listener using the variable from global storage.