Jump to content

I want to be notified when someone moves inside a Phantom prim


MadsCook
 Share

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

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

Recommended Posts

Hi, I'm trying to set up a sensor that gives me the name of the avatar that walks inside an invisible prim. Can someone help me with the script? 

i tried llvolumedetect(true) and llSensor, But could not make it work. 

Very thank full for all help

Link to comment
Share on other sites

That's what llVolumeDetect is for, so it should work for you.  Take a look at the very simple example script in the wiki.  Just remember, the function allows you to detect a collision with a phantom object.  If you are walking around inside a phantom object -- that is, you are already there, not entering it -- you are not colliding with the object.  

 

 

  • Like 1
Link to comment
Share on other sites

1 hour ago, MadsCook said:

i tried llvolumedetect(true) and llSensor, But could not make it work. 

what did you try, and what exactly didn't work about it? Either should trigger a detection event (collision_start() or sensor() ) from which you should be able to get the key of the detected avatar(s) with llDetectedKey() and convert it to a name with llKey2Name or a fancy SLURL, (llSay(0,"secondlife:///app/agent/"+(string)ID+"/inspect");)

if you want a 'notification' when you're not close by, consider llInstantMesage() or llEmail()

Edited by Quistess Alpha
  • Like 1
Link to comment
Share on other sites

default
{
    state_entry()
    {
        llVolumeDetect(TRUE); // Starts llVolumeDetect
    }
    collision_start(integer total_number)
    {
        llSay(0, "Detected!"); // Tells you when something penetrates the prim
    }
}

This works but i don't get the name of the avatar that is detected. Could you give me an example of what could work?

I wish to:
Send a message to just the owner of the script
If possible also to the group.

Link to comment
Share on other sites

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

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
 Share

×
×
  • Create New...