- Joined
- Jun 14, 2008
- Messages
- 176
I am trying to add a "Waveform" skill(from DotA) to my map.
Waveform: Causes the hero to, "teleport", move in a line and damage enemies until the hero reaches it's destination.
I have used a trigger paskovich made.
I edited the trigger a little(I made variables for unit group, added remove variable after use, and added a destroy special effects trigger) and here it is:
The problem is, when I use it ingame, the hero doesn't stop. The hero even goes all the way out the map boundaries/view(though, map doesn't crash).
"WaveformCounter" and "WaveformLength" is supposed to determine how far/how long the spell goes but it doesn't seem to work.
Does anyone know what's wrong with the trigger and can help me with this?
Waveform: Causes the hero to, "teleport", move in a line and damage enemies until the hero reaches it's destination.
I have used a trigger paskovich made.
I edited the trigger a little(I made variables for unit group, added remove variable after use, and added a destroy special effects trigger) and here it is:
-
Waveform
-
Events
-
Unit - A unit Starts the effect of an ability
-
-
Conditions
-
(Ability being cast) Equal to Waveform
-
-
Actions
-
Set WaveformHero = (Triggering unit)
-
Set WaveformHeroPoint = (Position of WaveformHero)
-
Set WaveformTempLoc = WaveformHeroPoint
-
Set WaveformTargetLoc = (Target point of ability being cast)
-
Set WaveformLength = (Distance between (Position of WaveformHero) and WaveformTargetLoc)
-
Set WaveformCounter = 0
-
Unit - Hide WaveformHero
-
Trigger - Turn on Waveform 2 <gen>
-
-
-
Waveform 2
-
Events
-
Time - Every 0.05 seconds of game time
-
-
Conditions
-
Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
WaveformCounter Less than (Integer(WaveformLength))
-
-
Then - Actions
-
Set WaveformTempLoc = (WaveformTempLoc offset by 75.00 towards (Angle from WaveformHeroPoint to WaveformTargetLoc) degrees)
-
Special Effect - Create a special effect at WaveformTempLoc using Objects\Spawnmodels\Naga\NagaDeath\NagaDeath.mdl
-
Special Effect - Destroy (Last created special effect)
-
Set WaveformUnitGroup = (Units within 350.00 of WaveformTempLoc matching ((((Matching unit) belongs to an enemy of (Owner of (Triggering unit))) Equal to True) and (((Matching unit) is alive) Equal to True)))
-
Unit Group - Pick every unit in WaveformUnitGroup and do (Actions)
-
Loop - Actions
-
Unit - Cause WaveformHero to damage (Picked unit), dealing (200.00 x (Real((Level of Waveform for (Triggering unit))))) damage of attack type Spells and damage type Normal
-
Set WaveformCounter = (WaveformCounter + 75)
-
-
-
Custom script: call DestroyGroup(udg_WaveformUnitGroup)
-
-
Else - Actions
-
Set WaveformHeroPoint = WaveformTempLoc
-
Unit - Unhide WaveformHero
-
Trigger - Turn off (This trigger)
-
-
-
-
"WaveformCounter" and "WaveformLength" is supposed to determine how far/how long the spell goes but it doesn't seem to work.
Does anyone know what's wrong with the trigger and can help me with this?