Self-Destruction: Difference between revisions

From Second Life Wiki
Jump to navigation Jump to search
No edit summary
m It's an example, not really a script
Line 1: Line 1:
{{LSL Header}}
Change the number in llSetTimerEvent('''30.0''') to set the time, in seconds, that it will take for the object to disappear.
Change the number in llSetTimerEvent('''30.0''') to set the time, in seconds, that it will take for the object to disappear.
==Script==
==Script==
Line 18: Line 20:
     }
     }
}</pre>
}</pre>
{{LSLC|Examples}}

Revision as of 21:13, 7 September 2007

Change the number in llSetTimerEvent(30.0) to set the time, in seconds, that it will take for the object to disappear.

Script

// Davada Gallant (John Girard), WWIIOLers
// 30-second self destructor

default
{
    state_entry()
    {
        //upon creation, immediately start the timer
        ''llSetTimerEvent(30.0)'';
    }

    //once the timer ticks off, kill the object
    timer()
    {
        llDie();   
    }
}