• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

[Trigger] Shockwave Dummy Trigger

Status
Not open for further replies.
Level 1
Joined
Jun 21, 2009
Messages
282
Needing help with a trigger, wanting to put it as a invisable shockwave with a dummy following it then the dummy gets removed when the shockwave ends. If you could put this on a map and link it that would be sweet! :grin: :grin:
 
Level 3
Joined
Dec 6, 2005
Messages
67
there has to be a better way of doing it, but this sorta works
  • Events
    • Unit - A unit Starts the effect of an ability
  • Conditions
    • (Ability being cast) Equal to Shockwave 2
  • Actions
    • Unit - Create 1 Infernal for (Owner of (Casting unit)) at ((Position of (Casting unit)) offset by 200.00 towards (Facing of (Casting unit)) degrees) facing (Facing of (Casting unit)) degrees
    • Set unit = (Last created unit)
    • Set facing = (Facing of (Casting unit))
    • Set caster_loc = (Position of (Casting unit))
    • For each (Integer A) from 1 to 6, do (Actions)
      • Loop - Actions
        • Unit - Move unit instantly to (caster_loc offset by (Real((((Integer A) x 100) + 200))) towards facing degrees)
        • Wait 0.01 seconds
    • Unit - Explode unit
The exploding part was just for cinematic effect lol
 
Last edited:

Cokemonkey11

Spell Reviewer
Level 30
Joined
May 9, 2006
Messages
3,547
there has to be a better way of doing it, but this sorta works
  • Events
    • Unit - A unit Begins casting an ability
  • Conditions
    • (Ability being cast) Equal to Shockwave 2
  • Actions
    • Unit - Create 1 Footman for (Owner of (Casting unit)) at (Position of (Casting unit)) facing (Facing of (Casting unit)) degrees
    • Set unit = (Last created unit)
    • For each (Integer A) from 1 to 8, do (Actions)
      • Loop - Actions
        • Unit - Move unit instantly to ((Position of (Casting unit)) offset by (Real(((Integer A) x 100))) towards (Facing of (Casting unit)) degrees)
        • Wait 0.01 seconds
    • Unit - Explode unit
The exploding part was just for cinematic effect lol

No that doesn't work at all.

You need a knockback system. And I'd recommend jass.
 
Level 3
Joined
Dec 6, 2005
Messages
67
@cokemonkey11 it does to 'work' lol, its not the greatest looking, and the initial spawn needs to be offset from the caster, but it does make him appear to slide and then explode at the end, however i agree a knockback system would probably be better lol

Edit:updated above trigger to more usable example
 
Level 10
Joined
Jan 28, 2009
Messages
442
OK. There are many ways, but it can be BASIC..
You just gotta use a missile unit. That's the EASIEST way, and maybe just as efficient, I reckon.

Just base your Shockwave on Summon Water Elemental and change summoned unit to your missile unit. Everytime someone FINISHES casting your little spell, pick every unit own by triggering player of type (Your Missile Unit) and order that unit to move to (Position of Picked Unit offset by (spell distance) towards facing of picked unit). Remember to adjust summon duration and missile unit's movement speed to the distance you want. And remember to give your missile unit an ability based on Permanent Immolation (to deal damage to nearby units). And remember to give it the missile unit Locust.

That should work perfect (Edit: or OK) (Edit: or good for starters).... and remember to take care of the leaks. "Position of picked unit" leaks, and "Pick all units" leaks. And remember to give the unit the right movement type. Preferably none.

You can make it more efficient and more complicated, using a periodic trigger, moving unit instantly, and constantly checking cliff levels, pathing, etc. (at your dispossal). If you do that, though, you can still base it on water elemental. But I won't give examples 'cuz I'm in a hurry, and it can be done in so many variations of ways.
 
Level 1
Joined
Jun 21, 2009
Messages
282
This should be rather easy if I understand you correctly. You want to create a shockwave that follows your hero? OR you want an invisible unit following your current shockwave? Or am I totally mistaking?

I want a invisable Shockwave with a unit going the direction your facing, and then the unit explodes/gets removed.
 
Level 2
Joined
Sep 2, 2004
Messages
15
The only way you are going to be able to do this, is through a trigger.

You have to create a dummy unit, and use the SetUnitMove command in GUI.., and periodic event - 0.03 seconds.

unit - move position to point with polar offset (facing, 10 )..

Stuff like that, look in the spells section for knockback spells.

I just want to make sure you you know that you can't do this an easy way. You have to trigger a unit to be created and moved towards the target point, and should actually just get rid of the shockwave so you don't have to optimize the movement of the unit with the WC3 projectile as that could get very difficult.

Also, shockwave should almost never be used, seeing as how Carrion Swarm is a more lag-free solution that has the same effect. (Shockwave deforms terrain, therefore lags a little)
 
Level 10
Joined
Sep 21, 2007
Messages
517
depends on the speed of the shockwave, creating a missile unit (dummy with locust) and moving it depending on the speed, now the math is up to you, although i suggest using distance / speed to make it an increment, but the problem is i dont know whats hte seconds used for the movement of the shockwave in blizzards programming, so.. up to you basically xD or you can just create the effect at an offset of (distance of shockwave) after waiting a few minutes based on a formulated decision.
 
Level 6
Joined
Jun 15, 2008
Messages
175
The only way you are going to be able to do this, is through a trigger.

You have to create a dummy unit, and use the SetUnitMove command in GUI.., and periodic event - 0.03 seconds.

unit - move position to point with polar offset (facing, 10 )..

Stuff like that, look in the spells section for knockback spells.

I just want to make sure you you know that you can't do this an easy way. You have to trigger a unit to be created and moved towards the target point, and should actually just get rid of the shockwave so you don't have to optimize the movement of the unit with the WC3 projectile as that could get very difficult.

Also, shockwave should almost never be used, seeing as how Carrion Swarm is a more lag-free solution that has the same effect. (Shockwave deforms terrain, therefore lags a little)

I agree it's a simple knockback spell. I'd recommend getting a knockback spell for this, I could try make you one at some point, though it will be later this week
 
Level 6
Joined
Jun 15, 2008
Messages
175
Hi, I've worked briefly on your shockwave/dummy spell. It's far from perfect at this point - I had a short amount of time. Let me know about the changes you want. I can't change the way it faces wrong if you target somewhere close to your hero without thinking alot.

That's the init trigger
  • Shockwave
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Shockwave (Invisible)
    • Actions
      • Set TargetedPoint = (Target point of ability being cast)
      • Set PositionCaster = (Position of (Casting unit))
      • Set Caster = (Casting unit)
      • Set Duration = 1.00
      • Set Distance = 20.00
      • Unit - Create 1 Shockwave Dummy (Custom Campaign) for Player 1 (Red) at PositionCaster facing (Angle from (Position of Caster) to TargetedPoint) degrees
      • Set DummyUnit = (Last created unit)
      • Trigger - Turn on Loop <gen>
Loop trigger
  • Loop
    • Events
      • Time - Every 0.04 seconds of game time
    • Conditions
    • Actions
      • Set DummyPosition = (Position of DummyUnit)
      • Set Duration = (Duration - 0.04)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Duration Greater than 0.00
        • Then - Actions
          • For each (Integer A) from 1 to 10, do (Actions)
            • Loop - Actions
              • Unit - Move DummyUnit instantly to (DummyPosition offset by Distance towards (Angle from PositionCaster to TargetedPoint) degrees), facing TargetedPoint
        • Else - Actions
          • Unit - Remove DummyUnit from the game
          • Set DummyUnit = No unit
          • Custom script: call RemoveLocation (udg_TargetedPoint)
          • Custom script: call RemoveLocation (udg_DummyPosition)
          • Custom script: call RemoveLocation (udg_PositionCaster)
          • Trigger - Turn off (This trigger)
PS send me a private message about changes and if you want the map sended to you.
 
Status
Not open for further replies.
Top