• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[Trigger] DotA's Waveform, need help with making spell, using paskovich's waveform trigger

Status
Not open for further replies.
Level 6
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:
  • 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)
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?
 
In the second trigger move the action
  • Set WaveformCounter = (WaveformCounter + 75)
behind the 'Unit Group' action and your problem will be fixed.

Taking a closer look at your problem; The WaveformCounter only goes up, when a unit is hit. But in this case, we want that the counter goes up, wether a unit is been hit or not.
 
Level 6
Joined
Jun 14, 2008
Messages
176
This spell is already done many times go on News Page - The Helper Forums and search through resources and there you will find it..

Thanks but the trigger I have is nearly finished already.

In the second trigger move the action
  • Set WaveformCounter = (WaveformCounter + 75)
behind the 'Unit Group' action and your problem will be fixed.

Taking a closer look at your problem; The WaveformCounter only goes up, when a unit is hit. But in this case, we want that the counter goes up, wether a unit is been hit or not.

Thanks that work.

Now I only have one question left, how do I make it so that the "same unit" can't be damaged twice in one spell cast?
 
Status
Not open for further replies.
Top