Path update
De DigiWiki.
Version du 17 mars 2012 à 03:22 par Djphil (discuter | contributions)
![]() |
Warning: This documentation is for the alpha release of LSL pathfinding. These LSL functions are available only on selected regions on the Aditi test grid, and not currently on the main grid. For more information, see Pathfinding/Alpha release notes. |
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
- llCreateCharacter
- llDeleteCharacter
- llEvade
- llExecCharacterCmd
- llGetClosestNavPoint
- llFleeFrom
- llNavigateTo
- llPatrolPoints
- llPursue
- llUpdateCharacter
- llWanderWithin
Events
- path_update