• 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

Status
Not open for further replies.
Level 7
Joined
Apr 30, 2007
Messages
322
How can i make a knockback , for sample in warlock , when the fireball hit a player the player will be knockbacked. I need that of the type a barrel of explosive dyes make knocback around the barrel range 100 and how can i set strenght of knockback ?
 
Level 7
Joined
Apr 30, 2007
Messages
322
WOW :D I see the trigger and it look rly hard. Variables is something that im not using , im not fully understandig it , all what i can with variables are dialogs. But i try it , thank you.
 
Level 11
Joined
May 31, 2008
Messages
698
I think this trigger is a little bit easier to understand

  • Knockback
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Knockback (Runner)
    • Actions
      • Set Knockback_Caster[(Player number of (Owner of (Triggering unit)))] = (Triggering unit)
      • Set Knockback_Target[(Player number of (Owner of (Triggering unit)))] = (Target unit of ability being cast)
      • Set Knockback_Location[(Player number of (Owner of (Triggering unit)))] = (Position of (Triggering unit))
      • Sound - Play PossessionMissileLaunch1 <gen> at 100.00% volume, attached to (Triggering unit)
      • For each (Integer A) from 1 to [U]16[/U], do (Actions)
        • Loop - Actions
          • Wait [B]0.01[/B] seconds
          • Unit - Move Knockback_Target[(Player number of (Owner of (Triggering unit)))] instantly to (Knockback_Location[(Player number of (Owner of (Triggering unit)))] offset by ((Distance between Knockback_Location[(Player number of (Owner of (Triggering unit)))] and (Position of Knockback_Target[(Player number of (Owner of (Triggering unit)))])) + [U]18.00[/U])
          • Special Effect - Create a special effect attached to the origin of Knockback_Target[(Player number of (Owner of (Triggering unit)))] using Objects\Spawnmodels\Other\ToonBoom\ToonBoom.mdl
          • Set Knockback_Effect[(Player number of (Owner of (Triggering unit)))] = (Last created special effect)
          • Wait [B]0.02[/B] seconds
          • Special Effect - Destroy Knockback_Effect[(Player number of (Owner of (Triggering unit)))]
Ok the underlined parts are the key to this trigger. The first one, for each instance 1 to 16, that means the unit is actually knocked back 16 times. and the +18, that means that the unit is knocked back 18 range or whatever each time.
And in bold is the time between each knockback, you add them together and get .03, so in this specific knockback spell, the target is knocked back 18 feet (or whatever unit you wanna call it), every .03 seconds, 16 times. So in .48 seconds, the target is knocked back 288 feet.

EDIT:
Underline and bold didnt work >:O but you get the idea where they are
And sorry for it being so long >.<
 
Level 11
Joined
Dec 31, 2007
Messages
780
paladon's GUI knock back system is the best ive seen in a while.. ill encourage you to use it

off-topic: actually... i dont understand why you are waiting 0.02 seconds to destroy an special effect... if you create it and immediately remove it the visual effect will be the same... I read somewhere that if you place a 0.01 and a.2 seconds wait it is gonna be the same coz the games minimum time is .27... is this correct?
 
Level 4
Joined
Mar 6, 2008
Messages
73
He may not understand jass :\

Thing is, the trigger needs to activate in a continuous loop and the target unit (the unit being knocked back) needs to move backwards very very slightly every .01-.05 seconds to make it look like a smooth slide. Now, I take it you don't know how to cause the unit to be knocked back exactly a 100 distance? If it's in GUI, it will be harder to set up, but not impossible, all you need to do is calculate.

Do you understand GUI or JASS?
 
Status
Not open for further replies.
Top