Pages

Saturday, November 27, 2010

Detecting A Name

Just had a quick question about detecting a name with a script. It's super easy to do, you only need one line:

touch_start(integer total_number)
    {
        llOwnerSay(llDetectedName(0));
    }

In this example I put it in a touch event, but it could also go in a collision event. You can also set things to be run by the owner of the object only by using the following snippet. Anything between the brackets will be owner only:

if(llDetectedKey(0) == llGetOwner()){

}