Page 1 of 1

sharing variables between lua scripts

Posted: 15.04.2012, 15:31
by astro
Hi all,

I am trying to write a celx script or a lua hook to read data from the
socket. From this data it sets the simulation time and rate and also
some global variables that allow to compute spacecraft position and
attitude in the vicinity of the simulation time. Then scriptedOrbit
and scriptedAttitude modules should access this global variables to
compute position and attitude.

However I realised after a simple test that I cannot share global
variables between celx and scriptedOrbit. I also read somewhere on the
forum that hooks, celx and scriptedOrbit/scriptedAttitude all run in
separate Lua contexts.

But I saw this post from Chris:
which is implying that it should be possible to exchange data between
a lua hook and a scripted orbit.
But how?

Thank you very much.