Send a command to the pathing system.

Syntax

void llExecCharacterCmd( integer command, list options );

Parameters

integer command
Command to be sent.
list options (instructions)
CHARACTER_CMD_*

Currently only supports stopping the current pathfinding operation or causing the character to jump.

Constants

CommandValueDescription & Required Parameters
CHARACTER_CMD_JUMP0x1Makes the character jump.

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

floatheightheight to jump, between 0.1m and 2.0m
CHARACTER_CMD_SMOOTH_STOP0x2Stops any current pathfinding operation in a smooth like fashion.
CHARACTER_CMD_STOP0x0Stops any current pathfinding operation.

Caveats

Examples

vector patrol;
 
default
{
    state_entry()
    {
        patrol = llGetPos();
        llCreateCharacter([CHARACTER_MAX_SPEED, 25, CHARACTER_DESIRED_SPEED, 15.0]);
        state awake;
    }
}
 
state awake
{
    state_entry()
    {
        llSay(0, "I am guarding now");
        list points = [patrol + <5,0,0>, patrol - <5,0,0>];
        llPatrolPoints(points, []);
    }
 
    touch_start(integer total_number)
    {
        state sleep;
    }
}
 
state sleep
{
    state_entry()
    {
        llSay(0, "Going to sleep");
        llExecCharacterCmd(CHARACTER_CMD_SMOOTH_STOP, []);
    }
 
    touch_start(integer total_number)
    {
        patrol = llGetPos();
        //Jump to attention!
        llExecCharacterCmd(CHARACTER_CMD_JUMP, [0.5]);
        state awake;
    }
}

See also

Events

Functions

Deep notes

History

Date of Release 31/07/2012