Jump to content

global value


Recommended Posts

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

-- 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

Edited by toha
Link to comment
Share on other sites

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";


Edited by toha
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • 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