llMessageLinked - 20 times??
|
|
Suzhanna Rossini
Shopaholic
Join date: 2 Apr 2007
Posts: 109
|
11-14-2007 06:48
I just started to experiment with llMessageLinked, and I noticed that it sends 20 messages from one call, not just one as I would expect.. It's the exact same content, and just one call...
Can anybody please enlighten me to why?
_____________________
When I'm hot, I'm cooking - When I'm not, I'm a bitch..
|
|
Siro Mfume
XD
Join date: 5 Aug 2004
Posts: 747
|
11-14-2007 07:04
From: Suzhanna Rossini I just started to experiment with llMessageLinked, and I noticed that it sends 20 messages from one call, not just one as I would expect.. It's the exact same content, and just one call...
Can anybody please enlighten me to why? how many prims were you sending to?
|
|
Suzhanna Rossini
Shopaholic
Join date: 2 Apr 2007
Posts: 109
|
11-14-2007 07:07
From: Siro Mfume how many prims were you sending to? I'm sending to LINK_THIS, and it's a one prim experiment.. The single prim contains 2 notecards and 4 scripts, so I'm quite puzzled by this.
_____________________
When I'm hot, I'm cooking - When I'm not, I'm a bitch..
|
|
Siro Mfume
XD
Join date: 5 Aug 2004
Posts: 747
|
11-14-2007 07:10
From: Suzhanna Rossini I'm sending to LINK_THIS, and it's a one prim experiment.. The single prim contains 2 notecards and 4 scripts, so I'm quite puzzled by this. what's your code?
|
|
Suzhanna Rossini
Shopaholic
Join date: 2 Apr 2007
Posts: 109
|
11-14-2007 07:18
From: Siro Mfume what's your code? Simplest possible, just to experiment... state_entry() { string _message = "Test message"; key g_kOwner = llGetOwner(); llMessageLinked(LINK_THIS, 547845, _message, g_kOwner); } In the other script: link_message(integer _sender, integer _number, string _message, key _id) { llWhisper(0, (string) _sender); llWhisper(0, (string) _number); llWhisper(0, _message); llWhisper(0, (string) _id); }
_____________________
When I'm hot, I'm cooking - When I'm not, I'm a bitch..
|
|
Debbie Trilling
Our Lady of Peenemünde
Join date: 17 Oct 2006
Posts: 434
|
11-14-2007 07:41
Move the llMessageLinked() from the state_entry() to a touch_start(). You'll be able to more accurately observe what is happening as it will be responding to touches, rather than the number of times you compile. SENDING SCRIPT:
default { state_entry() { } touch_start(integer touches) { string _message = "Test message"; key g_kOwner = llGetOwner(); llMessageLinked(LINK_THIS, 547845, _message, g_kOwner); } }
RECEIVING SCRIPT: default { state_entry() { }
link_message(integer _sender, integer _number, string _message, key _id) { llWhisper(0, (string) _sender); llWhisper(0, (string) _number); llWhisper(0, _message); llWhisper(0, (string) _id); } }
OUTPUT PER TOUCH: As Expected: [7:39] Object whispers: 0 [7:39] Object whispers: 547845 [7:39] Object whispers: Test message [7:39] Object whispers: 4e07f6d1-4598-4351-84fa-826ccb723ea8 So all appears to be working fine from this test. 
|
|
Siro Mfume
XD
Join date: 5 Aug 2004
Posts: 747
|
11-14-2007 08:25
You don't have to split them into two scripts either. But Debbie has the right idea. It was probably results from every time you compiled. Try the touch version to test your results, or manually reset your sending script once to see if it repeats multiple times, as the default state entry should only be firing once per reset (unless you are re-entering it multiple times for whatever reason).
|