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

Lua Labs • Converting LUA table to WML array

$
0
0
Apparently, you do this through wml.array_access.set, but it doesn't work, not creating new WML variables and not modifying exiting. What am I missing?

Code:

    wesnoth.game_events.on_mouse_move = function(x, y)local u = wesnoth.units.get(17, 3)local path, cost = wesnoth.paths.find_path(u, {3,20}, { ignore_units = true, viewing_side = 0 })for i, loc in ipairs(path) do    wml.array_access.set("coordinate_list", {x = loc[1], y = loc[2]})    endend

Statistics: Posted by Inkerrio — Today, 6:00 am



Viewing all articles
Browse latest Browse all 1990

Trending Articles