Quantcast
Channel: The Battle for Wesnoth Forums
Viewing all articles
Browse latest Browse all 2138

Lua Labs • unit.flying does not appear.

$
0
0
unit.flying does not appear.

Units that fly, according to [movetype] flying = yes [/movetype], should have a unit.flying variable.
For me, in this circumstance, it does not appear. The code below triggers with gryphons, bats, gliders.
And "unit.flying" never appears.

Code:

local function add_object(unit)    if not unit.flying then        wesnoth.interface.add_chat_message("not flying "..wesnoth.as_text(unit.flying))    endendon_event("recruit, recall", function (ctx)local unit = wesnoth.get_unit(ctx.x1, ctx.y1)if unit thenadd_object(unit)endend)

Statistics: Posted by B099 — Yesterday, 11:08 pm



Viewing all articles
Browse latest Browse all 2138