Standard Way to Know Whether a Script is in world
Janet Rossini
Script development on one's local computer is now quite practical, with a local slua system and VSCode. Scripts developed locally often need to now whether they are running in Second Life or locally, to skip some operations or substitute behavior.
There are hacks one can use to determine whether the script is in world or not, such as checking
_G.ares
for nil, or ll.Euler2Rot
, etc. Those are all subject to change more or less arbitrarily.Please provide a "guaranteed" and efficient way to determine whether a script is running locally or in world. Thanks!
Log In