User Tools

Site Tools


lua:scriptenvironments

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
lua:scriptenvironments [2015/11/01 22:22] – [Script Environments] vodurlua:scriptenvironments [2016/02/08 04:45] (current) – [Script Environments] vodur
Line 3: Line 3:
 All prog scripts run in the scripting environment that is attached to the game object to which the trigger is attached. For instance, mprogs run in the environment of the mob that is running the script. Each individual environment represents the "global" scope for the script, and thusly a "global" variable or function in one environment cannot be accessed from a script running in a different environment. All prog scripts run in the scripting environment that is attached to the game object to which the trigger is attached. For instance, mprogs run in the environment of the mob that is running the script. Each individual environment represents the "global" scope for the script, and thusly a "global" variable or function in one environment cannot be accessed from a script running in a different environment.
  
-There are a few wasys to share values between different script environments, the most simple to use being [[:lua:sharedtable|shared table]].+There are a few ways to share values between different script environments, the most simple to use being [[:lua:sharedtable|shared table]].
  
 ===== Simple interactions ===== ===== Simple interactions =====
lua/scriptenvironments.1446416568.txt.gz · Last modified: 2015/11/01 22:22 by vodur