Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Armored when close scripts

From Fightorder
Revision as of 16:55, 3 March 2026 by Qrow (talk | contribs) (1 revision imported)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

--activation of the UnitDef modifier--

in UnitDef the tag damagemodifier=0.1, mean 1/10 of damage will be deduced of health when activated by the AnimDef switch


  • know the state of armored and the armormodifier

local armored,numberarmorMultiple

armored,numberarmorMultiple=Spring.GetUnitArmored(unitID)


  • armor of UnitDef activated when variable set to 1

local doorclosed

if doorcloosed=1

then

Spring.SetUnitArmored(unitID,true)

else

Spring.SetUnitArmored(unitID,false)

end