- Joined
- Mar 17, 2012
- Messages
- 582
Hi guys! Am I crazy? What's wrong with this code? Caster damages target, but doesn't damage himself!
Cast:

Okay, now I separated those two actions and placed them into 2 similar triggers and now it works, bit what's the problem?
Cast:
-
Death Curse init
-

Events
-


Unit - A unit Starts the effect of an ability
-
-

Conditions
-


(Ability being cast) Equal to Death Curse
-
-

Actions
-


Set Player_Number_Int = (Player number of (Owner of (Triggering unit)))
-


Set Death_Curse_Caster[Player_Number_Int] = (Triggering unit)
-


Set Death_Curse_Target[Player_Number_Int] = (Target unit of ability being cast)
-


Set Death_Curse_Target_Point[Player_Number_Int] = (Position of Death_Curse_Target[Player_Number_Int])
-


Unit - Create 1 Regular Dummy for (Owner of Death_Curse_Caster[Player_Number_Int]) at Death_Curse_Target_Point[Player_Number_Int] facing Default building facing degrees
-


Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
-


Unit - Add Death Curse dummy to (Last created unit)
-


Unit - Order (Last created unit) to Neutral Alchemist - Acid Bomb Death_Curse_Target[Player_Number_Int]
-


Trigger - Turn on Death Curse loop <gen>
-


Custom script: call RemoveLocation(udg_Death_Curse_Target_Point[udg_Player_Number_Int])
-
-
-
Death Curse loop
-

Events
-


Time - Every 0.20 seconds of game time
-
-

Conditions
-

Actions
-


For each (Integer Player_Number_Int) from 1 to 12, do (Actions)
-



Loop - Actions
-




If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-





If - Conditions
-






(Death_Curse_Target[Player_Number_Int] has buff Death Curse ) Equal to True
-
-





Then - Actions
-






Set Death_Curse_Damage_Target[Player_Number_Int] = (((((Real((Level of Death Curse for Death_Curse_Caster[Player_Number_Int]))) x 3.00) + 2.00) + ((Real((Intelligence of Death_Curse_Caster[Player_Number_Int] (Include bonuses)))) x 0.05)) / 5.00)
-






Unit - Cause Death_Curse_Caster[Player_Number_Int] to damage Death_Curse_Target[Player_Number_Int], dealing Death_Curse_Damage_Target[Player_Number_Int] damage of attack type Spells and damage type Fire
-






Set Death_Curse_Damage_Caster[Player_Number_Int] = (((((Real((Level of Death Curse for Death_Curse_Caster[Player_Number_Int]))) x 2.00) + 1.00) + 0.00) / 5.00)
-






Unit - Cause Death_Curse_Caster[Player_Number_Int] to damage Death_Curse_Caster[Player_Number_Int], dealing Death_Curse_Damage_Caster[Player_Number_Int] damage of attack type Spells and damage type Fire
-
-





Else - Actions
-






Set Death_Curse_Target[Player_Number_Int] = No unit
-
-
-
-
-
-

Okay, now I separated those two actions and placed them into 2 similar triggers and now it works, bit what's the problem?
Last edited:








