Jump to content

global value


toha

Recommended Posts

Posted

hi. does exist in ELUNA possibility to declare global r/w variables? global for all scripts. values of this vars in server RAM and script can read it fast. if this variable changed on one script then other scripts can read new value.

just example

-- one script save value
SetWorldVar("propname",123);      

-- other script read value
local val = GetWorldVar('propname');   -- 123

if no then what is easiest way to set some global value and read that value from other scripts? for ex. AI stop move if other script set gloval var == 1

Posted

woow seems i like lua)) global variables are global for all scripts and i not need use shit that i wrote above. just awesome))

Posted

yes i've tried this but i use simplier)

globalvar = "this value can be used by all scripts and all them can change it and then that value will be changed for all scripts that use this variable";

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use