Requesting a value from another script?

How to request a variable (data) from another script?

{script2 code}

var nowvar = get var{vec3} script1;


If you have a reference to the entity that has the script, it be entityObj.script.Scriptname.var/function.

You can see an example here on Line 48:

You could also use events to communicate between scripts.