Hi
I'm making a spell where the Hero sends out loads of bolts of lightning for a short time and get attack speed (it's based on Berserk). Anyway the spell works fine other than that to make the lightning I've used dummy units and they don't use chain lightning when the ability kills an enemy.
I know that I could use lightning effects but I have no idea how they work so yer. Any ideas?
P.S. Note that this doesn't need to be GUI as you can only have one of this Hero.
EDIT - Fixed it by adding "Dead" and "Alive" tags to the Chain Lightning ability.
I'm making a spell where the Hero sends out loads of bolts of lightning for a short time and get attack speed (it's based on Berserk). Anyway the spell works fine other than that to make the lightning I've used dummy units and they don't use chain lightning when the ability kills an enemy.
I know that I could use lightning effects but I have no idea how they work so yer. Any ideas?
-
Thunder Storm
-
Events
- Time - Every 0.50 seconds of game time
- Conditions
-
Actions
- Set TempUnitGroup = (Units in (Playable map area) matching (((Matching unit) has buff Thunder Storm ) Equal to True))
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Number of units in TempUnitGroup) Greater than or equal to 1
-
Then - Actions
-
Unit Group - Pick every unit in TempUnitGroup and do (Actions)
-
Loop - Actions
- Set TS_CasterUnit = (Picked unit)
- Set TS_CasterPoint = (Position of TS_CasterUnit)
- Set TS_Group = (Units within 800.00 of TS_CasterPoint matching ((((Matching unit) is alive) Equal to True) and ((((Matching unit) is visible to (Owner of TS_CasterUnit)) Equal to True) and (((Owner of (Matching unit)) is an enemy of (Owner of TS_CasterUnit)) Equal to True))
- Set TS_Damage = ((Real((Agility of TS_CasterUnit (Exclude bonuses)))) x 2.00)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Number of units in TS_Group) Greater than or equal to 1
-
Then - Actions
- Set TS_TargetUnit = (Random unit from TS_Group)
- Set TS_Damage = (TS_Damage + ((Mana of TS_CasterUnit) x 0.05))
- Unit - Set mana of TS_CasterUnit to ((Mana of TS_CasterUnit) x 0.95)
- Unit - Create 1 Dummy (Thunder Storm) for (Owner of TS_CasterUnit) at TS_CasterPoint facing Default building facing degrees
- Set TempUnit = (Last created unit)
- Unit - Add a 0.10 second Generic expiration timer to TempUnit
- Unit - Order TempUnit to Orc Far Seer - Chain Lightning TS_TargetUnit
- Unit - Cause TS_CasterUnit to damage TS_TargetUnit, dealing TS_Damage damage of attack type Spells and damage type Universal
- Else - Actions
-
If - Conditions
- Custom script: call DestroyGroup(udg_TS_Group)
- Custom script: call RemoveLocation(udg_TS_CasterPoint)
-
Loop - Actions
-
Unit Group - Pick every unit in TempUnitGroup and do (Actions)
- Else - Actions
-
If - Conditions
- Custom script: call DestroyGroup(udg_TempUnitGroup)
-
Events
EDIT - Fixed it by adding "Dead" and "Alive" tags to the Chain Lightning ability.
Last edited: