Trigger:
- TP Test
- Events
- Unit - A unit Is attacked
- Conditions
- (Unit-type of (Attacking unit)) Equal to Zling
- Actions
- Game - Display to (All players) the text: (String(Abil_Int_ToxicPlume[(Player number of (Owner of (Attacking unit)))]))
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- And - All (Conditions) are true
- Conditions
- (Level of Toxic Plume for (Attacking unit)) Greater than or equal to 1
- (Random integer number between 1 and 100) Less than or equal to ((Level of Toxic Plume for (Attacking unit)) + 3)
- Conditions
- And - All (Conditions) are true
- Then - Actions
- Set Abil_Int_ToxicPlume[(Player number of (Owner of (Attacking unit)))] = 0
- Unit Group - Pick every unit in (Units within 600.00 of (Position of (Attacked unit)) matching (((Owner of (Picked unit)) is an enemy of (Owner of (Attacking unit))) Equal to True)) and do (Actions)
- Loop - Actions
- Unit - Cause (Attacking unit) to damage (Picked unit), dealing ((Real(Abil_Int_ToxicPlume[(Player number of (Owner of (Attacking unit)))])) x 12.50) damage of attack type Spells and damage type Normal
- Special Effect - Create a special effect attached to the overhead of (Picked unit) using Abilities\Spells\Human\CloudOfFog\CloudOfFog.mdl
- Loop - Actions
- Else - Actions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- Abil_Int_ToxicPlume[(Player number of (Owner of (Attacking unit)))] Less than or equal to ((Level of Toxic Plume for (Attacking unit)) x 25)
- Then - Actions
- Set Abil_Int_ToxicPlume[(Player number of (Owner of (Attacking unit)))] = (Abil_Int_ToxicPlume[(Player number of (Owner of (Attacking unit)))] + 1)
- Else - Actions
- If - Conditions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- Special Effect - Destroy (Last created special effect)
- Events
basically what it does is, for each time the hero attacks (if they have the spell) the variable increases by 1 up to a maximum of 25x the level of the ability. but, there's a chance (3+level of the ability) to deal 12.5x value of the variable damage to units in a 600 AOE.
right now i have added a cloud model to show up when it's casted, which i've just realized leaks (dont worry about it i'll fix it later)
the text that's displayed at the start of the trigger is just so i can see when the spell should be casting, which is when the variable is shown as 0.
the problem is, that when the time comes for this to cast, it doesn't. nothing happens at all except that the variable goes down to 0
what do i need to do to damage the surrounding units. i've also tried to simply cause the hero to damage an area of 600 around the attacked unit.