Difference between revisions of "LlExecCharacterCmd"

From Second Life Wiki
Jump to navigation Jump to search
Line 10: Line 10:
p2_name=options|
p2_name=options|
p2_desc=No options currently used.|
p2_desc=No options currently used.|
constants={{LSL Constants/ExecCharacterCmd}}|
constants={{LSL_Constants/llExecCharacterCmd}}|
caveats=* If another script in the same object issues CHARACTER_CMD_STOP then pathing in all scripts is cancelled.|
caveats=* If another script in the same object issues CHARACTER_CMD_STOP then pathing in all scripts is cancelled.|
examples=
examples=

Revision as of 16:43, 14 February 2012

Summary

Function: llExecCharacterCmd( integer command, list options );

Send a command to the pathing system.

• integer command Command to be sent.
• list options No options currently used.

Currently only supports stopping the current pathfinding operation.

Template:LSL Constants/llExecCharacterCmd

Caveats

  • If another script in the same object issues CHARACTER_CMD_STOP then pathing in all scripts is cancelled.

Examples

<lsl> default {

   state_entry()
   {
       llCreateCharacter([CHARACTER_DESIRED_SPEED, 50.0]);
       state awake;
   }

}

state awake {

   state_entry()
   {
       llOwnerSay("entering guarding");
       list points = [llGetPos() + <5,0,0>, llGetPos() - <5,0,0>];
       llPatrolPoints(points, []);
   }
   
   touch_start(integer total_number)
   {
       state sleep;
   }

}

state sleep {

   state_entry()
   {
       llOwnerSay("entering sleeping");
       llExecCharacterCmd(CHARACTER_CMD_STOP, []);
   }
   
   touch_start(integer total_number)
   {
       state awake;
   }

}

</lsl>

Deep Notes

Signature

function void llExecCharacterCmd( integer command, list options );