Hello all
I am making a turn based mod using the editor. I have a problem where I want a unit to attack and it attacks the target once and its energy deplets by 5 points. Currently I have this trigger running but the problem is that the energy keeps depleting till it reaches zero.
attack
Events
Unit - Hellion [23.81, 25.41] is issued an order to Attack
Local Variables
Conditions
Actions
Unit - Set Hellion [23.81, 25.41] Energy Regeneration Rate to -5.0
Unit - Set Hellion [23.81, 25.41] Energy Regeneration Rate to 0.0
Anyway to stop this from happening?
There's a cost field in weapons in the data editor, you can just make it cost 5 energy there. I think it'd also be better to just simply reduce energy by 5 instead of giving it negative regeneration (If you dont know how to do "math" stuff in triggers, its a function called "Arithmetic" (There's one with the suffix "Real" and another with the suffix "Integer". Unit Vitals are real numbers so use Real.)) Hope that helps.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
Events
Unit - Hellion [23.81, 25.41] is issued an order to Attack
Local Variables
Conditions
Actions
Unit - Set Hellion [23.81, 25.41] Energy Regeneration Rate to -5.0
Unit - Set Hellion [23.81, 25.41] Energy Regeneration Rate to 0.0
Anyway to stop this from happening?
@farban6: Go
There's a cost field in weapons in the data editor, you can just make it cost 5 energy there. I think it'd also be better to just simply reduce energy by 5 instead of giving it negative regeneration (If you dont know how to do "math" stuff in triggers, its a function called "Arithmetic" (There's one with the suffix "Real" and another with the suffix "Integer". Unit Vitals are real numbers so use Real.)) Hope that helps.