MovementManager ยป Ground Pathing
Namespace: Mayo.Manager.Movement
Denpendies: GC.MM
See the very bottom for GroundPathConfig.
Follows a previously generated path.
async Task FollowAsync(IUnit, GroundPathConfig?)
async Task FollowAsync(IPlayer, GroundPathConfig?)
async Task FollowAsync(IGameObject, GroundPathConfig?)
async Task FollowAsync(IModel, GroundPathConfig?)
Follows a dynamic generated path.
The path updates continuously.
Generates a static path to the specified location and follows it.
The GroundPathConfig 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,
UseDefaultOnStuckActions = true,
UseMount = false,
DismountOnCombatApproach = true,
LoopPath = false,
Actions = [],
ActionsAsync = [],
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 and reacts accordingly.
MonitorOffMesh
Type: bool
Default: true
Always includes all offmesh paths.
UseDefaultOnStuckActions
Type: bool
Default: true
Uses the default unstuck mechanic.
Disabling this option requires at least one action in OnStuckActions or in OnStuckActionsAsync.
UseMount
Type: bool
Default: false
Uses the mount if one is specified as usable.
DismountOnCombatApproach
Type: bool
Default: true
Leaves the mount before starting a combat.
LoopPath
Type: bool
Default: false
Starts again at coordinate 1 when the last coordinate has been reached.
Actions
Type: List<Action>
Default: Empty
Executed in the given order between 10 and 30 yards to the target position.
ActionsAsync
Type: List<Func<Task>>
Default: Empty
Executed in the given order between 10 and 30 yards to the target position.
OnStuckActions
Type: List<Func<bool>>
Default: Empty
This allows you to implement additional synchronous anti-stuck measures.
A boolean value is expected.
true = Success. Restarts the anti-stuck check.
OnStuckActionsAsync
Type: List<Func<Task<bool>>>
Default: Empty
This allows you to implement additional awaitable anti-stuck measures.
A boolean value is expected.
true = Success. Restarts the anti-stuck check.
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.