MovementManager ยป Flight Pathing
Namespace: Mayo.Manager.Movement
Denpendies: GC.MM
See the very bottom for FlightPathConfig.
Follows a previously generated path.
Generates a static path to the specified location and follows it.
The FlightPathConfig allows you to set various behavioral, visual, and other settings.
var ClosestUnit = GC.OM.GetClosestUnit();
if (ClosestUnit != null)
{
await GC.MM.FollowAsync(ClosestUnit, new GroundPathConfig(GC)
{
StopMovingWhenArrived = true,
StopFollowDistance = 2.0,
StopFollowTimeInMS = 0,
ShowWaypoints = true,
MonitorAntiStuck = true,
MonitorOffMesh = true,
LoopPath = false,
OnStuckActions = [],
OnStuckActionsAsync = [],
StopConditions = [],
});
}
StopMovingWhenArrived
Type: bool
Default: true
Stops the character as soon as they reach their destination.
StopFollowDistance
Type: double
Default: 2.0
Specifies the distance to the target position where the character should stop.
StopFollowTimeInMS
Type: int
Default: 0
Stops the action once the time has expired.
0 disables this option.
ShowWaypoints
Type: bool
Default: true
Displays waypoints visually.
Requires an enabled overlay in the options.
MonitorAntiStuck
Type: bool
Default: true
Checks if the character is stuck.
If the character is stuck while flying, the process is immediately interrupted.
MonitorOffMesh
Type: bool
Default: true
Always includes all offmesh paths.
LoopPath
Type: bool
Default: false
Starts again at coordinate 1 when the last coordinate has been reached.
OnStuckActions
Type: List<Func<bool>>
Default: Empty
This allows you to implement additional synchronous anti-stuck measures.
OnStuckActionsAsync
Type: List<Func<Task<bool>>>
Default: Empty
This allows you to implement additional awaitable anti-stuck measures.
StopConditions
Type: List<Func<bool>>
Default: Empty
Stops as soon as a condition is met.
It is also possible to interrupt the process via the configuration.