• 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.

[Spell] Shockwave

Status
Not open for further replies.
Level 7
Joined
May 30, 2018
Messages
290
Hello

cam somebody explain to me if it's possible to make this ability stun enemies and if how.

Thanks :)
 
Level 8
Joined
Dec 28, 2014
Messages
90
Yes, you need to use triggers.

Here is the easiest way to make it (but it has a lot of memory leaks):
- Create a dummy unit to cast a dummy spell
- Create a Shockwave ability without any special effects or damage, this is the ability your caster will use
- Create another Shockwave ability for the dummy unit, it has the damage and special effect
- Create a Firebolt ability for the dummy unit, it must have no missile and damage

For the triggers:


  • Shockwave Cast
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Shockwave (With Stun)
    • Actions
      • Unit - Create 1 Dummy for (Owner of (Triggering unit)) at (Position of (Triggering unit)) facing Default building facing degrees
      • Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
      • Unit - Add Shockwave (Dummy) to (Last created unit)
      • Unit - Order (Last created unit) to Orc Tauren Chieftain - Shockwave (Target point of ability being cast)


For Shockwave Cast, when a unit cast the Shockwave (the one without the special effect or damage), it will create dummy unit and cast the Shockwave with damage and special effects to the target area.


  • Shockwave Damage Event Init
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Unit Group - Pick every unit in (Units in (Entire map)) and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Unit-type of (Picked unit)) Not equal to Dummy
            • Then - Actions
              • Trigger - Add to Shockwave Stun <gen> the event (Unit - (Picked unit) Takes damage)
            • Else - Actions

  • Shockwave Damage Event
    • Events
      • Unit - A unit enters (Entire map)
    • Conditions
      • (Unit-type of (Triggering unit)) Not equal to Dummy
    • Actions
      • Trigger - Add to Shockwave Stun <gen> the event (Unit - (Triggering unit) Takes damage)


Shockwave Damage Event detects every unit in the map (except the Dummy) and add them into the Shockwave Stun's event.


  • Shockwave Stun
    • Events
    • Conditions
      • (Level of Shockwave (Dummy) for (Damage source)) Greater than 0
    • Actions
      • Unit - Create 1 Dummy for (Owner of (Damage source)) at (Position of (Triggering unit)) facing Default building facing degrees
      • Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
      • Unit - Add Stun (Dummy) to (Last created unit)
      • Unit - Order (Last created unit) to Neutral - Firebolt (Triggering unit)


For Shockwave Stun, when the registered unit from the Shockwave Damage Event trigger takes damage from a caster with a dummy Shockwave ability, it will create a dummy unit and stuns the damaged unit.

I added a sample spell in the attachment.

If you are concern about the memory leaks slowing down your map, read:
Guide to Memory Leaks

and the leak for the Shockwave Damage Event can be fixed with this library:
GUI Unit Indexer
 

Attachments

  • Shockwave with Stun.w3x
    19.5 KB · Views: 42
Last edited:
Level 4
Joined
Jul 26, 2017
Messages
66
Alternatively you can experiment with Impale since it pretty much does what you want (stun units in a line)
 
Level 25
Joined
Oct 18, 2008
Messages
945
well as I've recently learned there's a spell called breath of frost that does damage in a line and applies a buff.

you can detect damage, look for the buff, delete said buff when you find it and apply a stun. haven't tried but should work.

do not use impale. it has a weird invulnerability state and I'm pretty sure it causes weird bugs if you change like, anything about it.
 
Level 7
Joined
May 30, 2018
Messages
290
sorry I am very unexperienced, I don't know anything about making "dummys" , could somebody explain to me how I do that.
Furthermore how can I open the test spell you attached to your post @Glint , because when I download it, it just opens an empty editor map without anything :/
 
Level 8
Joined
Dec 28, 2014
Messages
90
sorry I am very unexperienced, I don't know anything about making "dummys" , could somebody explain to me how I do that.

Open the Object Editor (F6).

upload_2018-6-9_4-57-34.png


Create a new unit, in my example I choose a Footman.

Then here are the values to turn it into a dummy unit:

Abilities: Invulnerable (Neutral), Locust
Cast Backswing: 0.000
Cast Point: 0.000
Death Time: 0.10
Model File: Zone Indicator (Custom Campaign)
Shadow Image (Unit): None
Attacks Enabled: None
Death Type: Can't raise, Does not decay
Movement Speed Base: 0
Movement Type: Fly
Food Cost: 0
Sight Radius (both): 200
Name: Dummy

sorry I am very unexperienced, I don't know anything about making "dummys" , could somebody explain to me how I do that.
Furthermore how can I open the test spell you attached to your post @Glint , because when I download it, it just opens an empty editor map without anything :/

You could try opening it in the World Editor under File > Open Map... then select the map from there.
 
Level 7
Joined
May 30, 2018
Messages
290
Dude, Iam so thankful for your help, really really appreciate all the help, very nice and friendly community :)
 
Status
Not open for further replies.
Top