Jump to content
Sign in to follow this  
deanimo

detect object dropped on ground

You are about to reply to a thread that has been inactive for 3246 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

I want to make a script that detects when my object is dropped on the ground, and not attached, for example an script that says "i m on the ground" when it is dropped on a sandbox, and not attached, i couldnt find an event that discriminates when is rezzed on ground or attached,  i tryed in on_rez ovbiously but i get the same result when the object is attached...

thanks all for your help.

Share this post


Link to post
Share on other sites

Why not just do something like ....

default{     on_rez(integer startup)     {          llSay(0,"I'm alive!");     }     attach (key id)     {          if(id)          {               llSay(0,"I'm attached!");          }     }}

 If the object is rezzed but not attached, you only get the first message.  Otherwise, you get both.

Share this post


Link to post
Share on other sites

problem resolved, thanks to both.. i didnt know the getattached function, resolved using inside of on_rez event

if (!llGetAttached()) {

 

Thanks!

Share this post


Link to post
Share on other sites

be careful, as people can attach and then drop to ground.

 

when rezzing, on_rez happens first, then attach is added to the queue (so other queued events may potentially run before it)

Share this post


Link to post
Share on other sites
You are about to reply to a thread that has been inactive for 3246 days.

Please take a moment to consider if this thread is worth bumping.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...