Moopf Murray
Moopfmerising
Join date: 7 Jan 2004
Posts: 2,448
|
07-14-2004 10:48
Hi,
I can't find clarification of this in the Wiki or in the normal LSL documentation. Basically, I need to send some information to a rezzed object straight away (more than I can put in the integer parameter) and I have worked on two methods of doing this:
1. Call llRezObject and on the very next line call llSay on the channel the rezzed object will be listening on to send the information. 2. Call llRezObject, set up a listen, get the rezzed object to say 'hello' when it's rezzed and pick that up in the main object and send the parameters. This, of course, needs an extra listen.
Now, the thing is, I have been sitting here testing method 1 and not once have I had this method fail on me. But, I'm just not convinced that this is always going to be the case, and may just be because I'm in a sim with little load, so the object is rezzed before the say happens. However, if the script in the main object is being held until the object has finished rezzing then it would always work.
So, my question is, can I guarantee this always to happen and the rezzed object always to recieve the llSay? If I can I don't need the extra listen.
|
Wednesday Grimm
Ex Libris
Join date: 9 Jan 2003
Posts: 934
|
07-14-2004 11:09
You want the object_rez event.
_____________________
Sarcasm meter: 0 |-----------------------*-| 10 Rating: Awww Jeeze!
|
Moopf Murray
Moopfmerising
Join date: 7 Jan 2004
Posts: 2,448
|
07-14-2004 11:14
You know I'd completely forgotten about that event but, it still begs the question, why does my first option never seem to fail - is it luck? It's got me curious now.
|
Wednesday Grimm
Ex Libris
Join date: 9 Jan 2003
Posts: 934
|
07-14-2004 11:24
If there's two ways something can go, and the behaviour isn't specified in the docs, it will go the way you want all through your testing, but immediately switch over to the other way when you finish.
_____________________
Sarcasm meter: 0 |-----------------------*-| 10 Rating: Awww Jeeze!
|
Moopf Murray
Moopfmerising
Join date: 7 Jan 2004
Posts: 2,448
|
07-14-2004 11:31
Yes, that's what I thought but was curious if there was a logical explanation for it working every time. I've changed it to use the object_rez event now though, just to be on the safe side 
|
Christopher Omega
Oxymoron
Join date: 28 Mar 2003
Posts: 1,828
|
07-14-2004 15:50
The reason your first method works is because of pure luck. The time between when you call llRezObject and when the newly rezzed object is active enough to recieve listen signals differs based on how much the simulator is stressed at that specific moment in time. Trust me, Ive encountered situations where that llSay immediately after llRezObject solution failed.
So basicly, yeah, if you really want to make sure each object recieves the message, put the message in an object_rez event.
Helpful tip: object_rez is triggered in all scripts in the object, not just the one that called llRezObject.
==Chris
|