• 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.
  • It's time for the first HD Modeling Contest of 2025. Join the theme discussion for Hive's HD Modeling Contest #7! Click here to post your idea!

One last question..

Status
Not open for further replies.
Level 9
Joined
Aug 21, 2008
Messages
533
a shokwave based on stats is pretty hard for the beginning

first of all you need a movement system. You may abuse a knockback system for that)

create a dummy unit witht he model of the shokwave in the object editor.

Create a ability with the stats you want. In your case you may use a empty sholwave(no damage and projectille, just mana cost and cd and tootip)

You need to detect when the spell is casted.
Get the point where the spell was casted.
Create the dummy unit.Make sure it have the right facing(just amke it face the point)
Use the movement/knockback system to move the unit towards the point.
Now you have to pick all units in aoe around the wave every 0.1seconds.
damage them and add them to another group.
if they are already in the other group(which means they already got hit by the wave), dont damage them.

well that was the basic =)
 
Level 11
Joined
Feb 11, 2010
Messages
199
You basically have to program Shockwave yourself and use a trigger to apply the damage formula. Thankfully, Shockwave is a very simple spell! You just create a dummy unit, move it with a loop, check the enemies nearby it, and damage them according to whatever formula you want (then add them to a group so that you don't damage them multiple times!). Like so:

(Note: Base spell is Shockwave with most categories zeroed out, and of course you need to have a dummy unit.)
  • Shockwave
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Shockwave ABILITY
    • Actions
      • -------- MUI indexing --------
      • Set SW = (SW + 1)
      • Set SWSkip = (SWSkip + 1)
      • Set SWOn[SW] = True
      • -------- Basic Info --------
      • Set SWCaster[SW] = (Triggering unit)
      • Set SWOwner[SW] = (Owner of SWCaster[SW])
      • Set SWPoint[0] = (Position of SWCaster[SW])
      • Set SWPoint[1] = (Target point of ability being cast)
      • Set SWAngle[SW] = (Angle from SWPoint[0] to SWPoint[1])
      • -------- Change these values to whatever you want to change the spell damage, range, speed, etc --------
      • Set SWDistance[SW] = 800.00
      • Set SWArea[SW] = 125.00
      • Set SWSpeed[SW] = 31.50
      • Set SWLevel[SW] = (Level of Shockwave ABILITY for SWCaster[SW])
      • Set SWDamage[SW] = (((Real(SWLevel[SW])) x 50.00) + ((Real((Strength of SWCaster[SW] (Include bonuses)))) x ((Real(SWLevel[SW])) + 2.00)))
      • -------- Creating the shockwave dummy at an offset so that you only hit units in front of the Tauren Chieftain, instead of in a circle around him. --------
      • Set SWPoint[2] = (SWPoint[0] offset by SWArea[SW] towards SWAngle[SW] degrees)
      • Unit - Create 1 Dummy(Shockwave) for SWOwner[SW] at SWPoint[2] facing SWAngle[SW] degrees
      • Set SWDummy[SW] = (Last created unit)
      • Set SWPoint[3] = (Position of SWDummy[SW])
      • Set SWCheckGroup[SW] = (Units within SWArea[SW] of SWPoint[3])
      • Unit Group - Pick every unit in SWCheckGroup[SW] and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Picked unit) is in SWTargetGroup[SW]) Equal to False
              • ((Picked unit) is alive) Equal to True
              • ((Picked unit) is Magic Immune) Equal to False
              • ((Picked unit) is A ground unit) Equal to True
              • ((Owner of (Picked unit)) is an enemy of SWOwner[SW]) Equal to True
            • Then - Actions
              • Unit - Cause SWCaster[SW] to damage (Picked unit), dealing SWDamage[SW] damage of attack type Spells and damage type Normal
              • Unit Group - Add (Picked unit) to SWTargetGroup[SW]
            • Else - Actions
      • -------- Leaks are not your friend --------
      • Custom script: call DestroyGroup(udg_SWCheckGroup[udg_SW])
      • Custom script: call RemoveLocation(udg_SWPoint[0])
      • Custom script: call RemoveLocation(udg_SWPoint[1])
      • Custom script: call RemoveLocation(udg_SWPoint[2])
      • Custom script: call RemoveLocation(udg_SWPoint[3])
      • -------- More indexing --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • SWSkip Equal to 1
        • Then - Actions
          • Trigger - Turn on Shockwave Loop <gen>
        • Else - Actions
  • Shockwave Loop
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • -------- MUI indexing --------
      • For each (Integer SWA) from 1 to SW, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • SWOn[SWA] Equal to True
            • Then - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • SWDistance[SWA] Less than or equal to 0.00
                • Then - Actions
                  • -------- Ends the spell effect. --------
                  • Unit - Kill SWDummy[SWA]
                  • Set SWOn[SWA] = False
                  • Unit Group - Remove all units from SWTargetGroup[SWA]
                  • -------- Efficiency: Turns off the loop if no spell is in progress --------
                  • Set SWSkip = (SWSkip - 1)
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • SWSkip Equal to 0
                    • Then - Actions
                      • Set SW = 0
                      • Trigger - Turn off (This trigger)
                    • Else - Actions
                • Else - Actions
                  • -------- Move the dummy unit --------
                  • Set SWDistance[SWA] = (SWDistance[SWA] - SWSpeed[SWA])
                  • Set SWPoint[3] = (Position of SWDummy[SWA])
                  • Set SWPoint[4] = (SWPoint[3] offset by SWSpeed[SWA] towards SWAngle[SWA] degrees)
                  • Unit - Move SWDummy[SWA] instantly to SWPoint[4]
                  • -------- Select every unit around the dummy, then make sure they haven't already been damaged by this casting of the spell. --------
                  • -------- Also make sure they aren't Magic Immune or anything silly like that. --------
                  • Set SWCheckGroup[SWA] = (Units within SWArea[SW] of SWPoint[3])
                  • Unit Group - Pick every unit in SWCheckGroup[SWA] and do (Actions)
                    • Loop - Actions
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • ((Picked unit) is in SWTargetGroup[SWA]) Equal to False
                          • ((Picked unit) is alive) Equal to True
                          • ((Picked unit) is Magic Immune) Equal to False
                          • ((Picked unit) is A ground unit) Equal to True
                          • ((Owner of (Picked unit)) is an enemy of SWOwner[SWA]) Equal to True
                        • Then - Actions
                          • -------- Damage! --------
                          • Unit - Cause SWCaster[SWA] to damage (Picked unit), dealing SWDamage[SWA] damage of attack type Spells and damage type Normal
                          • -------- Here's where we make sure they don't get hit multiple times by the same spell --------
                          • Unit Group - Add (Picked unit) to SWTargetGroup[SWA]
                        • Else - Actions
                  • -------- What did I tell you about leaks not being your friend? They still aren't. --------
                  • Custom script: call DestroyGroup(udg_SWCheckGroup[udg_SWA])
                  • Custom script: call RemoveLocation(udg_SWPoint[3])
                  • Custom script: call RemoveLocation(udg_SWPoint[4])
            • Else - Actions
Please see the attached map.
 

Attachments

  • Shockwave Attribute.w3x
    22.8 KB · Views: 32
Last edited:
Status
Not open for further replies.
Top