Game logic - Global storage – Ylands

From Bohemia Interactive Community
Jump to navigation Jump to search
mNo edit summary
mNo edit summary
Line 19: Line 19:




{{Game logic list}}
----
{{Ylands scripting navbox}}

Revision as of 17:39, 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

  1. Add global storage and create a variable in it. In this case we made a simple variable for the example scenario called "Restart time".
  2. 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.
  3. 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.



Template:Ylands scripting navbox