Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Don't FORGET llResetSript()!!!

Grim Enigma
Registered User
Join date: 14 Nov 2005
Posts: 35
02-13-2006 17:27
This function is sooooo important! If I forget it in on_rez I usually end up wracking my brains figuring out why everything can seem so strange.

So if you're finding that things don't look right, don't quite work right, seems to go back where they were last time.... try putting a llResetScript() in your on_rez event if it applies.

http://secondlife.com/badgeo/wakka.php?wakka=llResetScript
Seagel Neville
Far East User
Join date: 2 Jan 2005
Posts: 1,476
02-13-2006 18:04
But I hate to change all settings back to be default whenever teleporting. :p
_____________________
:) Seagel Neville :)
Haravikk Mistral
Registered User
Join date: 8 Oct 2005
Posts: 2,482
02-14-2006 09:37
Doesn't need to be in the on_rez() for everything. You can also do:
CODE
changed(integer x) { if(x & 128) llResetScript(); }

The 128 is the value for "Owner has changed", it hasn't been defined as a constant for some reason.
Fenrir Reitveld
Crazy? Don't mind if I do
Join date: 20 Apr 2005
Posts: 459
02-14-2006 09:55
Haravikk, it has. Kinda, sorta. :)

CHANGED_OWNER is defined by the compiler, but for some reason the LSL editor doesn't tint it blue.
Nexeus Fatale
DJ Nexeus
Join date: 28 Aug 2004
Posts: 128
02-14-2006 11:07
ohh, you know, all I was doing was manually resetting the script (as in when it rezzes, everything it set to a default value) this helps a lot! ^.^!
_____________________
Website: www.nexeusfatale.com
[nf_d]: nfd.nexeusfatale.com