• 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] spell trigger for a complete noob. :D

Status
Not open for further replies.
Level 1
Joined
Apr 16, 2009
Messages
4
so, I want to make an ability based off of shockwave that creates a line of frost nova SFX.
kinda hard to explain.
a little like holy arrow in archer wars.
does anyone want to enlighten me on how to do this with triggers?
 
Level 8
Joined
Jun 1, 2008
Messages
341
Haven't Tested it yet in a rush if doesnt work tell me an i'll fix it when I get back..

  • Frost Nova Line
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to Shockwave
    • Actions
      • Set TempUnit = (Casting unit)
      • Set TempPoint = (Position of TempUnit)
      • Set TempPoint2 = (Target point of ability being cast)
      • Set TempReal = (Angle from TempPoint to TempPoint2)
      • Unit - Create 1 Dummy for (Owner of TempUnit) at TempPoint facing TempReal degrees
      • Unit - Set the custom value of (Last created unit) to 0
      • Unit - Add Shockwave (Neutral Hostile) to (Last created unit)
      • Unit - Set level of Shockwave (Neutral Hostile) for (Last created unit) to (Level of Shockwave for TempUnit)
      • Unit Group - Add (Last created unit) to FrostWave
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Number of units in FrostWave) Equal to 0
        • Then - Actions
          • Trigger - Turn on Frost Nova Line System <gen>
        • Else - Actions
  • Frost Nova Line System
    • Events
      • Time - Every 0.50 seconds of game time
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Number of units in FrostWave) Not equal to 0
        • Then - Actions
          • Unit Group - Pick every unit in FrostWave and do (Actions)
            • Loop - Actions
              • Set TempUnit = (Picked unit)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Custom value of (Picked unit)) Less than (350 + (150 x (Level of Shockwave (Neutral Hostile) for (Picked unit))))
                • Then - Actions
                  • Set TempPoint = (Position of TempUnit)
                  • Set TempPoint2 = (TempPoint offset by 50.00 towards (Facing of TempUnit) degrees)
                  • Unit - Set the custom value of TempUnit to ((Custom value of TempUnit) + 50)
                  • Unit - Move TempUnit instantly to TempPoint2
                  • Special Effect - Create a special effect at TempPoint2 using Abilities\Spells\Undead\FrostNova\FrostNovaTarget.mdl
                  • Special Effect - Destroy (Last created special effect)
                  • Special Effect - Create a special effect at TempPoint2 using Units\NightElf\Wisp\WispExplode.mdl
                  • Special Effect - Destroy (Last created special effect)
                  • Set TempGroup = (Units within 350.00 of TempPoint2 matching ((((Matching unit) is alive) Equal to True) and (((Owner of (Matching unit)) is an enemy of (Owner of TempUnit)) Equal to True)))
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Number of units in TempGroup) Not equal to 0
                    • Then - Actions
                      • Unit Group - Pick every unit in TempGroup and do (Actions)
                        • Loop - Actions
                          • Unit - Cause TempUnit to damage (Picked unit), dealing (Real(TempInteger)) damage of attack type Spells and damage type Cold
                    • Else - Actions
                  • Set TempUnit = No unit
                  • Custom script: Custom script: call RemoveLocation(udg_TempPoint)
                  • Custom script: Custom script: call RemoveLocation(udg_TempPoint2)
                  • Custom script: Custom script: call DestroyGroup(udg_TempGroup)
                • Else - Actions
                  • Unit - Remove TempUnit from the game
                  • Set TempUnit = No unit
        • Else - Actions
          • Trigger - Turn off (This trigger)
You may have to tamper with the numbers a bit such as 0.5 will be pretty fast fo this spell.

Also I have used shockwave as the base spell. You will need to alsouse the Unit version of the spell is the places I have indicated. (The settings for the Unit Shockwave dont matter as it will never actually be used).

Finaly I hope you know how to construct a dummy unit. If you dont, all you realy need to know is that it must fly, have no model and have the locus ability.
 
Status
Not open for further replies.
Top