Code: Select all
function gadget:UnitCreated(unitID, unitDefID, teamID, builderID)
if (wallActive and blockWeapons) then
local n = #UnitDefs[unitDefID].weapons
Spring.Echo ("n="..n)
for wi=0,n-1,1 do
Spring.SetUnitWeaponState (unitID, wi,{reloadFrame = 99999, reloadState = 9999})
end
end
But on some few units like XTA commander or Merl (T2 rocket launcher vehicle) it breaks the reloadbar of the healthbars:

Also shouldnt this:
Spring.SetUnitWeaponState (unitID, wi,{aimReady=2})
block the weapon too?