Difference between revisions of "LlExecCharacterCmd"

From Second Life Wiki
Jump to navigation Jump to search
(Created page with "{{Pathfinding alpha}} {{LSL_Function| func=llExecPathingCmd| func_desc=Send a command to the pathing system.| func_footnote=Currently only supports stopping the current pathfindi…")
 
Line 54: Line 54:
also_functions=
also_functions=
* [[llCreateCharacter]]
* [[llCreateCharacter]]
* [[llDeleteCharacter]]
* [[llEvade]]
* [[llExecPathingCmd]]
* [[llGetClosestNavPoint]]
* [[llFleeFrom]]
* [[llNavigateTo]]
* [[llPatrolPoints]]
* [[llPatrolPoints]]
* [[llPursue]]
* [[llUpdateCharacter]]
* [[llWanderWithin]]|
also_events=
* [[path_update]]
}}
}}

Revision as of 13:52, 14 February 2012

Summary

Function: llExecPathingCmd( 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.

Command Value Description & Required Parameters
CHARACTER_CMD_JUMP 0x1 Makes the character jump.

The option list is required to start with a height parameter: [float height]

• float height height to jump, between 0.1m and 2.0m
CHARACTER_CMD_SMOOTH_STOP 0x2 Stops any current pathfinding operation in a smooth like fashion.
CHARACTER_CMD_STOP 0x0 Stops any current pathfinding operation.

Caveats

  • If another script in the same object issues PATH_CMD_STOP then pathing in all scripts is cancelled.
All Issues ~ Search JIRA for related Bugs

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

Search JIRA for related Issues

Signature

function void llExecPathingCmd( integer command, list options );