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

knockback and flying corpses

Status
Not open for further replies.

_PV

_PV

Level 7
Joined
Aug 28, 2010
Messages
285
Okay lemme put it down step by step: (note: this is for GUI)

Make a trigger (obviously) and name it "GUI".
-
  • Events
  • Unit - A unit Starts the effect of an ability
(Generic Unit Event)
  • Conditions
  • (ability being cast) Equal to KnockBack
(Ability Comparison) oh, and "KnockBack" is just some ability I made, insert your own ability here :p

Now add 3 variables:

Caster - Unit
Target - Unit
Location - point

And set these variable
  • Actions
  • Set variable Caster = (Triggering Unit)/(Casting Unit)
  • Set variable Target = (Target Unit of ability being Cast)
  • Set variable Location = (Position of Caster)
(general Action)

Now make a new trigger, name it "Knock" or "Push" (or whatever)

  • Events
  • Time - Every 0.04 seconds of game time
(note: reason for 0.04 seconds of game time - it runs really smoothly and looks epic :p)
Now untick the "Initially On" box, so that it doesn't run forever.
Okay, this trigger only needs 1 action. This is the actual trigger that makes the knockback effect.

  • Unit - Move (variable TARGET) instantly to Point with polar offset
Now this is kind of the tricky part.
Okay, now take the Location variable
Make the offset by Arithmetic. You will see:
1.00 + 1.00 - both in blue
Click on the first "1.00"
Make it: Math - Distance between points -
Distance between Location and
(Position of Target).

Now click the second 1.00 and make it's value 5. (just do it :p)

Now make it "towards (math - angle between points)"
make it Angle from Location to Position of Target.

I'll include a few Screenshots If you don't understand, cause It's rather hard to explain it like this :pP
Now go back to the trigger "GUI"
add actions:
  • Actions
  • Trigger - Turn on Knock/push<gen>
  • Wait - 1.00 seconds
  • Trigger - Turn off Knock/push<gen>
Why wait 1 second? Cause watching somebody getting knocked back for 10 seconds is pretty lame :p

That's pretty much it! Just wait a sec lemme attach those screenshots.
Hope this helped :)
 

_PV

_PV

Level 7
Joined
Aug 28, 2010
Messages
285
Here's a simple map I just quickly made the trigger in. Try it out :p just cast Stormbolt or a peasant and watch em knock back. Though The ability would look better if it were a melee strike :p
 

Attachments

  • Knockback.w3x
    16.9 KB · Views: 40
Status
Not open for further replies.
Top