- Joined
- Mar 3, 2009
- Messages
- 327
Ok new bug entirely. The system works ok, except for the first attack. When a unit with happy powder is attacked, the first one will still deal damage, but all of the rest are blocked. How can I fix that?
-
Happy Powder
-
Events
-
Unit - A unit Starts the effect of an ability
-
-
Conditions
-
(Ability being cast) Equal to Happy Powder
-
-
Actions
-
Custom script: local integer udg_tempint
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
UnitInt Equal to 30
-
-
Then - Actions
-
Set UnitInt = 0
-
-
Else - Actions
-
-
Set UnitInt = (UnitInt + 1)
-
Set tempint = UnitInt
-
Trigger - Add to Hp2 <gen> the event (Unit - (Target unit of ability being cast) Takes damage)
-
Unit - Set the custom value of (Target unit of ability being cast) to UnitInt
-
Unit Group - Add (Target unit of ability being cast) to Hpgroup
-
Set Hpunit[UnitInt] = (Target unit of ability being cast)
-
Set CurrentHp[UnitInt] = (Life of (Triggering unit))
-
Set CurrentMp[UnitInt] = (Mana of (Triggering unit))
-
Wait 10.00 seconds
-
Unit Group - Remove Hpunit[tempint] from Hpgroup
-
Unit - Cause Boss to damage Hpunit[tempint], dealing Damstored[tempint] damage of attack type Chaos and damage type Universal
-
-
-
Hp2
-
Events
-
Conditions
-
((Triggering unit) is in Hpgroup) Equal to True
-
-
Actions
-
Set Damstored[(Custom value of (Triggering unit))] = (Damstored[(Custom value of (Triggering unit))] + (Damage taken))
-
Unit - Set life of (Triggering unit) to ((Life of (Triggering unit)) + (Damage taken))
-
-
-
Hp3
-
Events
-
Unit - A unit Dies
-
-
Conditions
-
((Triggering unit) is in Hpgroup) Equal to True
-
-
Actions
-
Unit Group - Remove (Triggering unit) from Hpgroup
-
Unit - Replace (Triggering unit) with a (Unit-type of (Triggering unit)) using The new unit's max life and mana
-
Unit Group - Add (Last replaced unit) to Hpgroup
-
Unit - Set the custom value of (Last replaced unit) to (Custom value of (Triggering unit))
-
Unit - Set life of (Last replaced unit) to CurrentHp[(Custom value of (Triggering unit))]
-
Unit - Set mana of (Last replaced unit) to CurrentMp[(Custom value of (Triggering unit))]
-
Set Hpunit[(Custom value of (Triggering unit))] = (Last Haunted Gold Mine)
-
Set char[(Player number of (Owner of (Triggering unit)))] = (Last replaced unit)
-
-
-
Hploop
-
Events
-
Time - Every 0.05 seconds of game time
-
-
Conditions
-
Actions
-
For each (Integer A) from 1 to 30, do (Actions)
-
Loop - Actions
-
Set CurrentHp[(Integer A)] = (Life of Hpunit[(Integer A)])
-
Set CurrentMp[(Integer A)] = (Mana of Hpunit[(Integer A)])
-
-
-
-
Last edited: