Cant issue patrol order
Posted: 26 Jun 2014, 19:54
I have this simple gadged and well it the order i give doesnt get issued, tough things work fine if i issue the order by hand.
Code: Select all
function gadget:UnitFinished(unit, unit_def, team)
if UnitDefs[unit_def].humanName == "Tiberium Refinery" then
local x, y, z = Spring.GetUnitPosition(unit)
local unitX = Spring.CreateUnit("harvester", x, y, z + 25, 0, team)
Spring.GiveOrderToUnit(unitX, CMD.PATROL, {x, y, z}, {})
end
end