Difference between revisions of "LlDeleteCharacter"
Jump to navigation
Jump to search
m (lol) |
Kireji Haiku (talk | contribs) m (fixed bug and change structure of example script) |
||
Line 6: | Line 6: | ||
|examples= | |examples= | ||
<lsl> | <lsl> | ||
create_character() | |||
{ | |||
// Clear any previous character behaviors | |||
llDeleteCharacter(); | |||
// default speed is 20 | |||
llCreateCharacter([CHARACTER_DESIRED_SPEED, 10.0]); | |||
llWanderWithin(llGetPos(), <10.0, 10.0, 2.0>, []); | |||
} | |||
default | default | ||
{ | { | ||
on_rez(integer start_param) | |||
{ | |||
llResetScript(); | |||
} | |||
state_entry() | state_entry() | ||
{ | { | ||
create_character(); | |||
} | } | ||
touch_start(integer num_detected) | |||
{ | { | ||
llDeleteCharacter(); | // Clear any previous character behaviors | ||
llDeleteCharacter(); | |||
} | } | ||
} | } |
Revision as of 13:58, 4 December 2012
LSL Portal | Functions | Events | Types | Operators | Constants | Flow Control | Script Library | Categorized Library | Tutorials |
Summary
Function: llDeleteCharacter( );Convert the object back to a standard object, removing all pathfinding properties.
Caveats
Examples
<lsl> create_character() { // Clear any previous character behaviors
llDeleteCharacter();
// default speed is 20
llCreateCharacter([CHARACTER_DESIRED_SPEED, 10.0]); llWanderWithin(llGetPos(), <10.0, 10.0, 2.0>, []);
}
default {
on_rez(integer start_param) { llResetScript(); }
state_entry() { create_character(); } touch_start(integer num_detected) { // Clear any previous character behaviors llDeleteCharacter(); }
}
</lsl>