Path update

De DigiWiki.

default
{
    state_entry()
    {
        llDeleteCharacter(); // Clear any previous character behaviors
        llCreateCharacter([CHARACTER_DESIRED_SPEED, 35.0]);
 
        llWanderWithin(llGetPos(), 10.0, []);
    }
 
    path_update(integer type, list reserved)
    {
        if (type == 0)
        {
            llOwnerSay("Near");
        }
        else if (type == 1)
        {
            llOwnerSay("Stopping");
        }
        else if (type == 2)
        {
            llOwnerSay("Cannot path find from current location! Attempting to go to the center of the region.");
 
            llNavigateTo(<128.0, 128.0, llGround(<128.0, 128.0, 0.0> - llGetPos())>, [FORCE_DIRECT_PATH, TRUE]);
        }
        else if (type == 3)
        {
            llOwnerSay("Goal not on navmesh!");
        }
        else if (type == 4)
        {
            llOwnerSay("Goal unreachable!");
        }
        else if (type == 5)
        {
            llOwnerSay("Target gone!");
        }
        else if (type == 6)
        {
            llOwnerSay("No place to go!");
        }
        else if (type == 7)
        {
            llOwnerSay("Hiding from pursuer...");
        }
        else if (type == 8)
        {
            llOwnerSay("Switched from hiding to running...");
        }
        else if (type == 9)
        {
            llOwnerSay("Region has no nav mesh..");
        }
        else if (type == 1000000)
        {
            llOwnerSay("Hit an unspecified failure");
        }
        else
        {
            llOwnerSay("Unknown failure");
        }
    }
}

Also

Events

  • path_update
Outils personnels
  • Cette page a été consultée 941 fois.
donate
Google Ads