EN Runtime API 19 Movement Settings - LIHACHTETAN/ClassicUO-Bad-Newbie-CSharp-Scripts-IDE GitHub Wiki
Українська · Русский · English · Deutsch · Français · Italiano · Español · 繁體中文 · 日本語 · 한국어
Runtime API — Motion settings
Home · C# · IDE · UO API · A–Z · Examples · Languages
Each team opens a card with C#-signatures, parameters and several independent examples.
Initial pathfinding settings
In a new script context, UO.moveHeuristicMult() is 120 and UO.moveTurnCost() is 14. An explicit value set by the script is retained for its following movement commands. Multiplier 100 uses the ordinary diagonal-aware distance estimate; a higher multiplier usually speeds up searching but does not guarantee the shortest route. A lower value can substantially increase calculation time. Turn cost 0 disables the extra penalty for changing direction. These settings affect route search, rather than character speed or the UO.LimitMove bound.
int previousHeuristic = (int)UO.moveHeuristicMult();
int previousTurnCost = (int)UO.moveTurnCost();
try
{
UO.moveHeuristicMult(120);
UO.moveTurnCost(14);
UO.Print($"Heuristic: {UO.moveHeuristicMult()}, turn cost: {UO.moveTurnCost()}");
}
finally
{
UO.moveHeuristicMult(previousHeuristic);
UO.moveTurnCost(previousTurnCost);
}
UO.moveCheckStamina
Minimum stamina for movement commands.
UO.moveOpenDoor
Attempts to open doors in the direction of travel.
UO.moveThroughCorner
Resolution of the diagonal between cells with one side cell blocked.
UO.moveThroughNPC
Allowing attempts to pass through characters.
UO.SetWalkMountTimer
Sets the step interval for walking on horseback. Use to intentionally slow down or return to standard speed. You cannot speed up movement beyond the standard tempo with this command.
UO.SetWalkUnmountTimer
Sets the walking step interval. Use to intentionally slow down or return to standard speed. You cannot speed up movement beyond the standard tempo with this command.