Hey guys, me again. Having trouble with my fire spell. It is supposed to light a unit on fire for 8 seconds, dealing 20 damage per second, and then (if the unit is still alive) detonate and do AOE damage. Upon detonation, I want a 20% chance that another unit within a 200 range of the original target will catch on fire.
I use 2 spells, 4 variables, and 2 triggers:
Spells
Draining Flames: Primary spell built off of doom. Deals 20/dmg per sec for 8 seconds. Summons no units.
Draining Flames (Dummy version): No cooldown, no mana cost verion of above the spell with a 200 range. Designed to allow my flames to 'jump' to other units.
Variables:
DrainFlameTarget - Unit variable to identify the target currently on fire.
DrainFlameDummy - Unit variable to identify the dummy caster.
DrainFlameJumpCount - Integer variable used to count how many times draining flames has jumped (used to prevent it from jumping more than 3 times).
DrainFlameLevel - integer variable that tracks what level the spell is at.
Triggers:
Flames: Is supposed to assign the target of the spell to a variable as well as reseting the jump count variable.
Flames2: Deals aoe damage from location of drainflametarget as well as causing the flames to jump if drainflametarget is still alive.
Here are my triggers:
Finally, sometimes it does work right. When this happens, however, it does not detonate on the second unit; the flames just fizzle out after 8 seconds and do not jump again.
I would greatly appreciate (and give rep to) anyone who helps.
Thanks.
I use 2 spells, 4 variables, and 2 triggers:
Spells
Draining Flames: Primary spell built off of doom. Deals 20/dmg per sec for 8 seconds. Summons no units.
Draining Flames (Dummy version): No cooldown, no mana cost verion of above the spell with a 200 range. Designed to allow my flames to 'jump' to other units.
Variables:
DrainFlameTarget - Unit variable to identify the target currently on fire.
DrainFlameDummy - Unit variable to identify the dummy caster.
DrainFlameJumpCount - Integer variable used to count how many times draining flames has jumped (used to prevent it from jumping more than 3 times).
DrainFlameLevel - integer variable that tracks what level the spell is at.
Triggers:
Flames: Is supposed to assign the target of the spell to a variable as well as reseting the jump count variable.
Flames2: Deals aoe damage from location of drainflametarget as well as causing the flames to jump if drainflametarget is still alive.
Here are my triggers:
-
Flames
-
Events
-
Unit - A unit Begins casting an ability
-
-
Conditions
-
((Ability being cast) Equal to Draining Flames ) or ((Ability being cast) Equal to Draining Flames (Dummy Version))
-
-
Actions
-
Set DrainFlameTarget[(Player number of (Owner of (Triggering unit)))] = (Target unit of ability being cast)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Ability being cast) Equal to Draining Flames
-
-
Then - Actions
-
Set DrainFlameJumpCount[(Player number of (Triggering player))] = 0
-
Leaderboard - Change the value for Player 6 (Orange) in (Last created leaderboard) to DrainFlameJumpCount[(Player number of (Owner of (Triggering unit)))]
-
-
Else - Actions
-
Do nothing
-
-
-
-
-
Flames 2
-
Events
-
Unit - A unit Finishes casting an ability
-
-
Conditions
-
((Ability being cast) Equal to Draining Flames ) or ((Ability being cast) Equal to Draining Flames (Dummy Version))
-
-
Actions
-
Wait 8.00 seconds
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
DrainFlameLevel[(Player number of (Owner of (Triggering unit)))] Equal to 1
-
-
Then - Actions
-
Unit - Cause DrainFlameTarget[(Player number of (Owner of (Triggering unit)))] to damage circular area after 0.00 seconds of radius 200.00 at (Position of DrainFlameTarget[(Player number of (Owner of (Triggering unit)))]), dealing 220.00 damage of attack type Spells and damage type Fire
-
-
Else - Actions
-
Do nothing
-
-
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
DrainFlameLevel[(Player number of (Owner of (Triggering unit)))] Equal to 2
-
-
Then - Actions
-
Unit - Cause DrainFlameTarget[(Player number of (Owner of (Triggering unit)))] to damage circular area after 0.00 seconds of radius 200.00 at (Position of DrainFlameTarget[(Player number of (Owner of (Triggering unit)))]), dealing 300.00 damage of attack type Spells and damage type Fire
-
-
Else - Actions
-
Do nothing
-
-
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
DrainFlameLevel[(Player number of (Owner of (Triggering unit)))] Equal to 3
-
-
Then - Actions
-
Unit - Cause DrainFlameTarget[(Player number of (Owner of (Triggering unit)))] to damage circular area after 0.00 seconds of radius 200.00 at (Position of DrainFlameTarget[(Player number of (Owner of (Triggering unit)))]), dealing 380.00 damage of attack type Spells and damage type Fire
-
-
Else - Actions
-
Do nothing
-
-
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
DrainFlameLevel[(Player number of (Owner of (Triggering unit)))] Equal to 4
-
-
Then - Actions
-
Unit - Cause DrainFlameTarget[(Player number of (Owner of (Triggering unit)))] to damage circular area after 0.00 seconds of radius 200.00 at (Position of DrainFlameTarget[(Player number of (Owner of (Triggering unit)))]), dealing 460.00 damage of attack type Spells and damage type Fire
-
-
Else - Actions
-
Do nothing
-
-
-
Special Effect - Create a special effect attached to the origin of DrainFlameTarget[(Player number of (Owner of (Triggering unit)))] using Objects\Spawnmodels\Other\NeutralBuildingExplosion\NeutralBuildingExplosion.mdl
-
Special Effect - Create a special effect attached to the origin of DrainFlameTarget[(Player number of (Owner of (Triggering unit)))] using Objects\Spawnmodels\Human\SmallFlameSpawn\SmallFlameSpawn.mdl
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(DrainFlameTarget[(Player number of (Owner of (Triggering unit)))] is dead) Equal to False
-
-
Then - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Random integer number between 1 and 100) Less than or equal to 100
-
DrainFlameJumpCount[(Player number of (Owner of (Triggering unit)))] Less than 3
-
-
Then - Actions
-
Set DrainFlameJumpCount[(Player number of (Triggering player))] = (DrainFlameJumpCount[(Player number of (Owner of (Triggering unit)))] + 1)
-
Unit - Create 1 Dummy for PLY_Players[(Player number of (Owner of (Triggering unit)))] at (Position of DrainFlameTarget[(Player number of (Owner of (Triggering unit)))]) facing (Position of (Triggering unit))
-
Set DrainFlameDummy[(Player number of (Owner of (Triggering unit)))] = (Last created unit)
-
Wait 0.20 seconds
-
Unit - Order DrainFlameDummy[(Player number of (Owner of (Triggering unit)))] to Neutral Pit Lord - Doom (Random unit from (Units within 200.00 of (Position of DrainFlameTarget[(Player number of (Owner of (Triggering unit)))])))
-
Game - Display to (All players) the text: THE FLAMES HAVE JUM...
-
Leaderboard - Change the value for Player 6 (Orange) in (Last created leaderboard) to DrainFlameJumpCount[(Player number of (Owner of (Triggering unit)))]
-
Wait 1.00 seconds
-
Unit - Remove DrainFlameDummy[(Player number of (Owner of (Triggering unit)))] from the game
-
-
Else - Actions
-
Do nothing
-
-
-
-
Else - Actions
-
Do nothing
-
-
-
-
Finally, sometimes it does work right. When this happens, however, it does not detonate on the second unit; the flames just fizzle out after 8 seconds and do not jump again.
I would greatly appreciate (and give rep to) anyone who helps.