- 0
LSL How to detect the event of rez but not attached to avatar?
You are about to reply to a thread that has been inactive for 2583 days.
Please take a moment to consider if this thread is worth bumping.
Please take a moment to consider if this thread is worth bumping.
Question
Madelaine McMasters
Hi robotommy,
It's been ages since I've scripted, but that won't stop me from making something up.
"on_rez" fires whether the item is rezzed on the ground or as an attachment. After "on_rez" fires, "attach" will fire if the thing is attached. The delay from on_rez() to attach() should be fairly short, so start a timer with on_rez() and if it times out before attach(), you've got the condition you're looking for. If attach() happens before the timeout, it can cancel the timer.
http://wiki.secondlife.com/wiki/On_rez
http://wiki.secondlife.com/wiki/Attach
Maybe something like...
on_rez(){
llSetTimerEvent(0.5); // figure out the shortest delay that won't expire before attach() happens, if it happens.
}
attach(){
llSetTimerEvent(0);
}
timer(){
llSay(0,"I'm rezzed!");
}
Good luck!
Link to comment
Share on other sites
2 answers to this question
Recommended Posts
Please take a moment to consider if this thread is worth bumping.
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now