iPcPathFinder Struct Reference
This is a pathfinder property class. More...
Public Member Functions
|virtual void||Interrupt ()=0|
|Interrupt a movement. |
|virtual bool||Seek (iSector *sector, const csVector3 &position)=0|
|Move to the specified position. |
This is a pathfinder property class.
It works closely with pcsteer in order to move an object from one position to another using celgraph to navigate correctly through the map.
This property class can send out the following messages:
- 'cel.move.interrupted' (old 'pcpathfinder_interrupted'): movement has been interrupted.
This property class supports the following actions (add prefix 'cel.move.pathfinder.action.' if you want to access this action through a message):
- Seek: parameters 'sectorname' (string), 'position' (vector3).
- Wander: parameters 'distance' (int).
- Pursue: parameters 'target' (iCelEntity*), 'max_prediction' (float).
- FollowCyclicPath: parameters 'path' (iCelPath*).
- FollowOneWayPath: parameters 'path' (iCelPath*).
- FollowTwoWayPath: parameters 'path' (iCelPath*).
- Interrupt: interrupt the current movement.
This property class supports the following properties:
- position (vector3, read only): current end position.
- active (bool, read only): returns true if currently tracking.
- pursue_max_prediction (float, read/write): current max prediction
- min_distance (float, read/write): current min distance to check when arriving to check points (nodes).
Member Function Documentation
|virtual void iPcPathFinder::Interrupt||(||)||
Interrupt a movement.
The behaviour will get a 'pcmover_interrupted' message if the mover was really moving. Otherwise nothing happens.
Move to the specified position.
When you call this function this property class will attempt to move the linmove to the correct position. If it fails the behaviour will get a 'pcmover_stuck' message. Otherwise it will get a 'pcmover_arrived' message. If checklos parameter is true a line of sight test will be made in advance, and if this function detects that line of sight is blocked then the behaviour will get a 'pcmover_impossible' message and this function will return false then. If this property class was already controlling a movement then that movement will be interrupted (possibly giving a pcmover_interrupted message).
sector is the desired sector to move to. position is the desired position to move to. sqradius if the linmove ends up within the given squared radius of the desired position the movement will stop and be considered sucessful. checklos whether to check line of sight to destination on movement start.
The documentation for this struct was generated from the following file:
Generated for CEL: Crystal Entity Layer 2.1 by doxygen 1.6.1