I've been trying to make a shield work that recharges when it's hit by an ion weapon.I can't get it to recharge. I know that the (shpRechargeShield) function is returning true, but it won't heal the shield any. The shield just takes the damage. My code is this for it:
Code: Select all
<Events>
<OnShieldDamage>
(block nil
(if (eq aDamageType 'ion)
(block (rechargeAmount)
(setq rechargeAmount (multiply 2 aShieldDamageHP))
(shpRechargeShield gSource rechargeAmount)
)
)
)
</OnShieldDamage>
</Events>

Play in over
100 systems in a network. Play the
2011 Mod Of the Year
and the highest rated mod on Xelerus,
The Network.
Play the July Mod of the Month,
Fellow Pilgrims!
Play
My other mods as well
(Drako Slyith)* I am a person
(Eliza chatbot)> Do you believe it is normal to be a person?