Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

global variables sharing

Dominique Laville
Registered User
Join date: 24 Apr 2008
Posts: 84
05-18-2008 14:59
is it possible to share global variables between 2 different scripts in the same object ?

If not, how can I pass variables? By sending messages from/to the same object ?

thanks
Ordinal Malaprop
really very ordinary
Join date: 9 Sep 2005
Posts: 4,607
05-18-2008 15:05
(a) No.

(b) Yes. Link messages should be fine in almost all cases that I can think of, though there other potential methods.
_____________________
http://ordinalmalaprop.com/forum/ - visit Ordinal's Scripting Colloquium for scripting discussion with actual working BBCode!

http://ordinalmalaprop.com/engine/ - An Engine Fit For My Proceeding, my Aethernet Journal

http://www.flickr.com/groups/slgriefbuild/ - Second Life Griefbuild Digest, pictures of horrible ad griefing and land spam, and the naming of names
Ollj Oh
Registered User
Join date: 28 Aug 2007
Posts: 522
05-19-2008 03:34
Easiest way is llMessageLinked.
Maybe use external (PHP) databases.

llSetObjectname and llSetObjectdesc (and llGet..) set/read prim property and can be used for copyable data storage. but its very limited in size and strings only.
other prim properties set via llSetPrimitiveParams (llGet...) could also be used for data storage to some degree (lists of varipus data, very limited)

Both are PUBLC and readable by anyone in range.