Mounted travel
AXIOM NAV never mounts or dismounts. It stops where you should, fires an event, and walks on once you have.
local self = {}
local function cast_my_mount()
-- your own mount cast (a spell or an item): AXIOM NAV leaves this to you
end
local function setup(client)
-- On foot with mount = true: the walk stops where the mount can be ridden from
client:on("mount_here", function(d)
-- d.why_not_before: e.g. "indoors" when the walk came out of a building
-- d.ride: how many yards can be ridden from here
cast_my_mount() -- the walk rides on by itself once mounted
end, self)
-- Mounted: the walk stops 2 yd before a door, a low roof, a narrow gap or a no-mount area
client:on("dismount_needed", function(d)
core.log("getting off: " .. d.why) -- "indoors", "low", "narrow", "no_mounts_area"
core.input.dismount() -- the walk goes on on foot by itself
end, self)
end
local client = _G.AXIOM_NAV and _G.AXIOM_NAV.client
if client then
setup(client)
-- Undercity: walks out on foot, stops past the way out for the mount, rides to the zeppelin
client:move_to({ x = 2066.8, y = 289.4, z = 97.0 }, function(ok, reason)
core.log("zeppelin: " .. (ok and "arrived" or tostring(reason)))
end, { mount = true })
endTimeouts
| Wait | Default | Option | When it runs out |
|---|---|---|---|
| For you to mount | 10 s | mount_wait_ms | Walks on on foot, never fails |
| For you to dismount | 20 s | dismount_wait_ms | Fails with needs_dismount |
Notes
- Fences, steps and drops are ridden. No get-off point is put before them.
- Deep water: the game takes the mount itself. The route keeps to dry ground if that is not much longer.
- A big mount:
{ mount = { height = 3.5, width = 2 } }. - Before the walk starts,
client:get_ride_from()says where riding is possible and for how far.