|
Zlinks Karu
Design & Build Services
Join date: 9 Oct 2008
Posts: 12
|
03-26-2009 19:03
I have this script that sets up a random variable based off of the root prims key:
listenChannel = ( -1 * (integer)("0x"+llGetSubString((string)llGetLinkKey(LINK_ROOT),-5,-1)) )
I am using this to set the listening channel for an object. If I put this in one of the link sets other prims, it works fine until I take the object into inventory and then rez it back. Then it breaks and the settings that are in that linked prim stop working, but the main script still works fine.
Any suggestions?
|
|
Ruthven Willenov
Darkness in your light
Join date: 16 Jan 2008
Posts: 965
|
03-26-2009 19:07
i assume you're putting that in the state entry? object keys change each time they're rezzed. the state entry is only run once when the script is compiled, or reset, or when switching between states, so if you aren't doing any of that, then it won't check for the new key. if it's possible you should have the script reset on rez
|
|
Zlinks Karu
Design & Build Services
Join date: 9 Oct 2008
Posts: 12
|
03-26-2009 19:10
That makes sense. I'll try that and see if that fixes it. Thank you.
|
|
Papalopulus Kobolowski
working mind
Join date: 11 Aug 2006
Posts: 326
|
03-26-2009 19:24
Or if you dont whant to loose another variable , just do again the part where you get the variable needed in the on_rez part, not all again with reset script.
|
|
Ruthven Willenov
Darkness in your light
Join date: 16 Jan 2008
Posts: 965
|
03-26-2009 19:33
From: Papalopulus Kobolowski Or if you dont what to loose another variable , just do again the part where you get the variable needed in the on_rez part, not all again with reset script. that too, lol, forgot to mention that
|
|
Zlinks Karu
Design & Build Services
Join date: 9 Oct 2008
Posts: 12
|
03-26-2009 21:20
Thanks so much. I got it to work perfectly. I did set it to reset the entire script only because after you said that I realized that another part of the script reads who the owner is and that could run into a similar problem.
|