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

WML Workshop • Re: Goto micro_ai query

$
0
0
Is there any way I can use :inspect - or anything else - to see if a unit is controlled by a micro ai or the default ai?
There's probably an easier way to do this, but I would suggest editing data/ai/micro_ais/cas/ca_goto.lua and just start adding debug statements:

Code:

function ca_goto:execution(cfg, data)    local units, locs = GO_units, GO_locs    -- DEBUG!!!    print('Number of units: ' .. #units);    for i,unit in ipairs(units) do      print(unit.side .. ': ' .. unit.type .. ': ' .. unit.x .. ',' .. unit.y)    end    ...

Statistics: Posted by gnombat — Yesterday, 11:07 pm



Viewing all articles
Browse latest Browse all 1176

Trending Articles