|
Jonar Boa
Registered User
Join date: 3 Mar 2007
Posts: 9
|
03-03-2008 01:48
I'm sure this was asked before, but i couldn't find it. I made a pillow with 2 scripts. One handles the menus and rezzes and unrezzes prims, the other is basically a pose ball script.The pose ball script should delete the rezzed prims on Stand Up. When the pillow is rezzed, the main script generates a random communication channel (ComCh). Is there a way to let the poseball script know the value of ComCh? I could make a "physical" pose ball, but i was so proud to have the whole project in one prim  Thanks for any hints
|
|
Dylan Rickenbacker
Animator
Join date: 11 Oct 2006
Posts: 365
|
03-03-2008 02:05
Hmmm ... if I understand you correctly, the poseball script resides in the rezzed object, which is different from and not linked to the object the main script resides in, right? In that case, if you absolutley have to use a random channel, I guess the only way is to have your main script llSay the random number on a fixed channel.
|
|
Beezle Warburton
=o.O=
Join date: 10 Nov 2006
Posts: 1,169
|
03-03-2008 02:58
If it has to talked to an unlinked rezzed part, you're better off just using a fixed, but obscure channel, and use the following if statement inside your listen for security: llListen(integer channel, string name, key id, string msg) { if(llGetOwnerKey(id) == llGetOwner() || id == llGetOwner()) { //dosomestuff } } This checks to make sure the command is either coming from the owner or from an object owned by the same person. ==== If you need scripts in the same prim to talk to each other, you'll want to use llMessageLinked and the corresponding link_message http://rpgstats.com/wiki/index.php?title=LlMessageLinkedhttp://rpgstats.com/wiki/index.php?title=Link_message
_____________________
Though this be madness, yet there is method in't. -- William Shakespeare Warburton's Whimsies: In SLApez.biz
|
|
Jonar Boa
Registered User
Join date: 3 Mar 2007
Posts: 9
|
03-03-2008 04:35
Sorry Dylan for not being clear. On monday morning, my brain is always packed in mud. Beezle, Link Message does the job. I didnt know that this also works with a single prim. Big thanks to both of you 
|
|
Void Singer
Int vSelf = Sing(void);
Join date: 24 Sep 2005
Posts: 6,973
|
03-03-2008 11:41
if you're rezzing the object, you can feed it the random channel in the start parameter, and read it in the new objects script in the on rez event.
_____________________
| | . "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... | - 
|