How to request a variable (data) from another script?
{script2 code}
var nowvar = get var{vec3} script1;
{end}
How to request a variable (data) from another script?
{script2 code}
var nowvar = get var{vec3} script1;
{end}
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: https://playcanvas.com/editor/code/410547?tabs=4608603
You could also use events to communicate between scripts.