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 revision Previous revision
lua:scriptenvironments [2015/11/01 14:22]
vodur [Script Environments]
lua:scriptenvironments [2016/02/07 20:45] (current)
vodur [Script Environments]
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.txt ยท Last modified: 2016/02/07 20:45 by vodur