Difference between revisions of "Collision"

From Second Life Wiki
Jump to navigation Jump to search
(...oops)
Line 8: Line 8:
//Will turn phantom when someone bumps into it if on the list
//Will turn phantom when someone bumps into it if on the list
list access_list = ["Governor Linden"];
list access_list = ["Governor Linden"];
default{
default{
     collision(integer num_detected){
     collision(integer num_detected){
         if(llListFindList(access_list, (list)llKey2Name(llDetectedKey(0))) != -1){
         if(~llListFindList(access_list, (list)llDetectedName(0))){
             llSetStatus(STATUS_PHANTOM, TRUE);
             llSetStatus(STATUS_PHANTOM, TRUE);
         }
         }
Line 16: Line 17:
}
}
</pre>
</pre>
|helpers
|helpers
|also_header
|also_header

Revision as of 15:29, 22 May 2007

Description

Event: collision( integer num_detected ){ ; }

Triggered while task is colliding with another task

• integer num_detected

Examples

//Will turn phantom when someone bumps into it if on the list
list access_list = ["Governor Linden"];

default{
    collision(integer num_detected){
        if(~llListFindList(access_list, (list)llDetectedName(0))){
            llSetStatus(STATUS_PHANTOM, TRUE);
        }
    }
}

See Also

Deep Notes

Signature

event void collision( integer num_detected );