Seagel Neville
Far East User
Join date: 2 Jan 2005
Posts: 1,476
|
06-01-2005 22:07
Hello there,
There are nine objects all linked on ten spots. If I touch the root prim, it requests nine children to report where they are. And what I want to know is which spot there is no object on.
Can link_message event accomplish this? If it can, how are nine messages dealed with? Or should I use multi channels on listen event?
Thanks.
_____________________
 Seagel Neville 
|
Escort DeFarge
Together
Join date: 18 Nov 2004
Posts: 681
|
06-02-2005 02:25
If they are linked, you could return the key as the last argument... ...and use the others to specify the "space number" or llGetPos() or both.
llMessageLinked(myControlLinknum, space_number, (string)llGetPos(), llGetKey());
_____________________
http://slurl.com/secondlife/Together
|
Eggy Lippmann
Wiktator
Join date: 1 May 2003
Posts: 7,939
|
06-02-2005 02:49
Never use listeners for short range communications if you can link the objects and use link messages instead. Listeners are very laggy - they constantly poll the sim for chat messages. The messages, you need to create them yourself. Pass the position vector as a string or something - llMessageLinked lets you send an integer, a key and a string.
|
Strife Onizuka
Moonchild
Join date: 3 Mar 2004
Posts: 5,887
|
06-02-2005 03:49
and there is greater security in linked messages.
_____________________
Truth is a river that is always splitting up into arms that reunite. Islanded between the arms, the inhabitants argue for a lifetime as to which is the main river. - Cyril Connolly
Without the political will to find common ground, the continual friction of tactic and counter tactic, only creates suspicion and hatred and vengeance, and perpetuates the cycle of violence. - James Nachtwey
|
Seagel Neville
Far East User
Join date: 2 Jan 2005
Posts: 1,476
|
06-02-2005 05:51
Thank you, everybody! But what I wanted to know is that the root prim would receive messages all at once from nine children and how it should decide what messages were whose ones. The first child says From: someone llMessageLinked(myControlLinknum, space_number, (string)llGetPos(), llGetKey()); The second child syas From: someone llMessageLinked(myControlLinknum, space_number, (string)llGetPos(), llGetKey()); The third child syas From: someone llMessageLinked(myControlLinknum, space_number, (string)llGetPos(), llGetKey()); . . . The ninth child syas From: someone llMessageLinked(myControlLinknum, space_number, (string)llGetPos(), llGetKey()); And the root prim receives link_message(integer sender_num, integer num, string str, key id) Can the root prim memorize all children's messages in the "str" variable? If so, how is it recalled? Is this available? if(sender_num == 2) { llOwnerSay("The first child says " + str); } if(sender_num ==3) { llOwnerSay("The second child says " + str); } . . . And can I get nine all messages?
_____________________
 Seagel Neville 
|
Escort DeFarge
Together
Join date: 18 Nov 2004
Posts: 681
|
06-02-2005 08:14
Ah ok, well it will probably help if you appreciate that in your "root prim", the link_message() event will be called nine times. i.e. Separate invocations for each message sent by the "child prims".
/esc
_____________________
http://slurl.com/secondlife/Together
|
Seagel Neville
Far East User
Join date: 2 Jan 2005
Posts: 1,476
|
06-02-2005 08:29
Thank you. I'll try to use llMessageLinked.
_____________________
 Seagel Neville 
|