|
Bilbo Goodliffe
all around good guy
Join date: 30 Dec 2005
Posts: 22
|
02-08-2007 05:02
I am trying to script the reciever from the sender : llMessageLinked(link_all_others,0,"furl",""  ; would the reciever be link_message(integer sender_num, integer num, string str, key id) _______________________________________________________ I can seem to find information about what the meaning of the values between the ( ) in the reciever. I am new and can't seem to figure this all out, Thanks
|
|
Artemis Cain
Take it or Leave it
Join date: 11 Apr 2005
Posts: 116
|
02-08-2007 07:57
From: Bilbo Goodliffe I am trying to script the reciever from the sender : llMessageLinked(link_all_others,0,"furl",""  ; would the reciever be link_message(integer sender_num, integer num, string str, key id) _______________________________________________________ I can seem to find information about what the meaning of the values between the ( ) in the reciever. I am new and can't seem to figure this all out, Thanks Yes, that is how the receiver should be. These are the parts of the linked message integer sender_num - this identifies who the sender is integer num - this can be used as a variable string str - pass your message here key id - I use as another variable. here is a sample of how I use a linked message llMessageLinked(LINK_ALL_OTHERS,0,"EHLO","2");
link_message(integer sender, integer num, string message, key id) { if(key == 2) { llSay(0, message); } }
I hope this clears things up a little for you! -Artemis
|
|
Lee Ponzu
What Would Steve Do?
Join date: 28 Jun 2006
Posts: 1,770
|
02-08-2007 09:49
The event handlers are a little bit like function calls. When an event arrives, the information in the event will be assigned to the parameters in the event handler, and those names are local to the event handler.
By the way, you don't need to use the names that the template suggests. You can use any names you like, that have meaning for you.
|
|
Bilbo Goodliffe
all around good guy
Join date: 30 Dec 2005
Posts: 22
|
thanks
02-08-2007 10:05
yes helps a lot, thanks
|
|
Bilbo Goodliffe
all around good guy
Join date: 30 Dec 2005
Posts: 22
|
like this
02-08-2007 11:00
ok how's this?
default { state_entry() {
link_message(intger sender, intger num, string message, key id { If (message == main)
llSetAlpha(1.0,all sides)
{ else if (message ==furl) llSetAlpha(0.0,allsides)
{
else return
} } }
}
}
|
|
Pale Spectre
Registered User
Join date: 2 Sep 2005
Posts: 586
|
02-08-2007 12:56
...close... default { state_entry() { }
link_message(integer sender, integer num, string message, key id { If (message == "main") { llSetAlpha(1.0, ALL_SIDES); } else if (message == "furl") { llSetAlpha(0.0, ALL_SIDES); } else return; } } 
|