- Joined
- Jan 23, 2015
- Messages
- 788
Guys, apoligies if it's a dumb question, but, is there something wrong with this action? I am stressing over this trigger whole day and I don't know what I am doing wrong but the it doesn't set the unit's life to the value I want it to.
I am trying to make a unit's life hit-based (it dies after certain amount of times it gets hit).
Btw, the unit is a structure, does that has something to do with the bug?
I am trying to make a unit's life hit-based (it dies after certain amount of times it gets hit).
Btw, the unit is a structure, does that has something to do with the bug?
-
TombHit
-
Events
-
Game - PDD_damageEventTrigger becomes Equal to 1.00
-
-
Conditions
-
(Unit-type of PDD_target) Equal to Tomb
-
PDD_damageType Equal to PDD_PHYSICAL
-
TombHitsRemaining[(Player number of (Owner of PDD_target))] Not equal to 0
-
-
Actions
-
Set TombIndex = (Player number of (Owner of PDD_target))
-
Set TombHitsRemaining[TombIndex] = (TombHitsRemaining[TombIndex] - 1)
-
Set PDD_amount = 0.00
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
TombHitsRemaining[TombIndex] Equal to 0
-
-
Then - Actions
-
Unit - Cause PDD_source to damage PDD_target, dealing 99999.00 damage of attack type Spells and damage type Normal
-
Game - Display to (All players) the text: (String(TombHitsRemaining[TombIndex]))
-
-
Else - Actions
-
Game - Display to (All players) the text: (String(TombHitsRemaining[TombIndex]))
-
Unit - Set life of PDD_target to (((Max life of PDD_target) / (Real(TombHitsReq[TombLevel[TombIndex]]))) x (Real(TombHitsRemaining[TombIndex])))
-
Game - Display to (All players) the text: (String((((Max life of PDD_target) / (Real(TombHitsReq[TombLevel[TombIndex]]))) x (Real(TombHitsRemaining[TombIndex])))))
-
-
-
-