|
Allan Monday
Registered User
Join date: 29 Jan 2009
Posts: 17
|
02-26-2009 06:39
Or better said Randomize Problem, I am working on a server Unit that triggers a event at a randomly choosen remote prim at a random time. The UUID of that remote prim is going to be written on a notecard inside the server. My approach to randomize the UUID was to get the Number of notecardlines run a llFrand pass the result into a llGetNotecardLine and use the resultfrom that to get a random UUID out of that notecard The question is if there is a easier way to do it, just a general hint would help already. Thank you in advance
|
|
Destiny Niles
Registered User
Join date: 23 Aug 2006
Posts: 949
|
02-26-2009 08:11
or you can read in the entire notecard into a list and randomize the list and avoid doing readlines in the future. The list randomizer function is http://wiki.secondlife.com/wiki/LlListRandomize
|
|
Dora Gustafson
Registered User
Join date: 13 Mar 2007
Posts: 779
|
02-26-2009 08:44
From: Allan Monday The UUID of that remote prim is going to be written on a notecard inside the server. I hope you are aware that the prim UUID is a new one every time the prim is rezzed? It might end up with an awful lot of note card editing 
_____________________
From Studio Dora
|
|
Allan Monday
Registered User
Join date: 29 Jan 2009
Posts: 17
|
02-26-2009 08:50
From: Dora Gustafson I hope you are aware that the prim UUID is a new one every time the prim is rezzed? It might end up with an awful lot of note card editing  thank you for your concern there, but the whole thing is suposed to be for a RP Sim and therefore I hope they leave objects rezzed for a certain period of time. If not..well tough luck for them <insert evil laugh here> And thank you for the tip with the List, however I cant realy get it so it gives me only one UUID back it gives me the whole list each time i call it. On that note after thinking for 5 minutes longer I gonna go with object names instead of UUID's
|
|
Dora Gustafson
Registered User
Join date: 13 Mar 2007
Posts: 779
|
02-26-2009 12:03
From: Allan Monday And thank you for the tip with the List, however I cant realy get it so it gives me only one UUID back it gives me the whole list each time i call it.
Why is that?? I'm sure the idea was to read all lines in the card and make each line a list entry; Then randomize the list and take first entry as your UUID. You could also randomize a list pointer and pick the list entry it points
_____________________
From Studio Dora
|
|
Void Singer
Int vSelf = Sing(void);
Join date: 24 Sep 2005
Posts: 6,973
|
02-26-2009 15:23
out of curiosity, are these linked prims? if so scrap the list. use their link numbers or names (names is also a good way to go for unlinked, prevents rez-uuid issues as you seem to have guessed)
_____________________
| | . "Cat-Like Typing Detected" | . This post may contain errors in logic, spelling, and | . grammar known to the SL populace to cause confusion | | - Please Use PHP tags when posting scripts/code, Thanks. | - Can't See PHP or URL Tags Correctly? Check Out This Link... | - 
|
|
Allan Monday
Registered User
Join date: 29 Jan 2009
Posts: 17
|
02-26-2009 17:48
From: Void Singer out of curiosity, are these linked prims? if so scrap the list. use their link numbers or names (names is also a good way to go for unlinked, prevents rez-uuid issues as you seem to have guessed) no they are all over a sim so they going to communicate over llRegionSay
|