- Joined
- May 15, 2009
- Messages
- 192
Hello Hivers
I'm making a trigger that creates a link between two locations (one of the locations being centered on a moveable hero), damaging all enemy units getting too close to the link.
I've got the damage working alright, but I also want to have a Lightning Effect show between the two points, signifying the link -and furthermore, I'd like to have a special effect on the units that get caught by the link. The trigger loop follows below.
Help is much appreciated, if anything needs elaboration, do not hesitate to ask.
I'm making a trigger that creates a link between two locations (one of the locations being centered on a moveable hero), damaging all enemy units getting too close to the link.
I've got the damage working alright, but I also want to have a Lightning Effect show between the two points, signifying the link -and furthermore, I'd like to have a special effect on the units that get caught by the link. The trigger loop follows below.
-
Infernal Totem Loop
-
Events
- Time - Every 0.05 seconds of game time
-
Conditions
- (HeroUnit[1] is alive) Equal to True
- (Number of living Infernal Totem units owned by Player 1 (Red)) Greater than 0
-
Actions
- -------- Sets the initial variables: tempp1 = casterloc, tempp2 = totemloc, tempr1 = distance between points, tempr2 = burnAoE, tempr3 = angle between points --------
- Set Tempp1 = (Position of HeroUnit[1])
- Custom script: set bj_wantDestroyGroup = true
-
Unit Group - Pick every unit in (Units in (Playable map area) matching ((Unit-type of (Matching unit)) Equal to Infernal Totem)) and do (Actions)
-
Loop - Actions
- Set Tempp2 = (Position of (Picked unit))
-
Loop - Actions
- Set Tempr1 = (Distance between Tempp1 and Tempp2)
- Set Tempr2 = 150.00
- Set Tempr3 = (Angle from Tempp1 to Tempp2)
- -------- Updates the link, then picks units around the link and damages them. --------
- Lightning - Create a Finger of Death lightning effect from source Tempp1 to target Tempp2
- Lightning - Destroy (Last created lightning effect)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- Tempr4 Less than or equal to Tempr1
-
Then - Actions
- Set Tempr4 = (Tempr4 + Tempr2)
- Set Tempp3 = (Tempp1 offset by Tempr4 towards Tempr3 degrees)
- Custom script: set bj_wantDestroyGroup = true
-
Unit Group - Pick every unit in (Units within Tempr2 of Tempp3 matching ((((Matching unit) is A structure) Not equal to True) and ((((Matching unit) belongs to an enemy of (Owner of HeroUnit[1])) Equal to True) and ((((Matching unit) is Magic Immune) Not equal to True) and (((Matching unit) and do (Actions)
-
Loop - Actions
- Special Effect - Create a special effect attached to the overhead of (Picked unit) using Abilities\Spells\Other\ImmolationRed\ImmolationRedDamage.mdl
- Unit - Cause HeroUnit[1] to damage (Picked unit), dealing (Tempr1 / 20.00) damage of attack type Spells and damage type Normal
- Special Effect - Destroy (Last created special effect)
-
Loop - Actions
-
Else - Actions
- Set Tempr4 = 0.00
-
If - Conditions
-
Events
Last edited: