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

Unusual knokdown

Status
Not open for further replies.
Level 4
Joined
May 29, 2008
Messages
92
I again

I need a knokout ability that would knok units in every strike threw tem fo some distense. But unit should do that onli with units thats are smaller then his size. I don't wart to input all units that he can knokdown rather then that he cant becouse it would be very much to input. Can I use there size, that pointed in editor? Or i should input near 73(+-20) units?
 
Level 4
Joined
May 29, 2008
Messages
92
I use WE Unlimited And download almost all programs for JASS from that site! Alright does someone can give just a simple code of knokback? Pleeeeeeese
 
Last edited:
Level 29
Joined
Jul 29, 2007
Messages
5,174
You should first learn how to write, then how to ask people for help/favors, and only after you have finished both of them - open a thread and ask.

To be nice I'll answer your question anyway - no you can't check for unit sizes, you will have to use another way.

You might also try the search button and search for a knockback since there are countless codes and question threads about them.
 
Level 4
Joined
May 29, 2008
Messages
92
I seached in posts and in thread but dont find anything about knokback but big thanks for link if 1 know that i wouldn't open that threat. And english isn't my first language so i'm not very good in that
 
Level 4
Joined
May 29, 2008
Messages
92
I already look thanks it very usefull. And did you know could i delate this thread someway or it may disturb another people?
 

TKF

TKF

Level 19
Joined
Nov 29, 2006
Messages
1,267
Here's a simple knockback trigger - VERY SIMPLE. But this is just a single target spell example.

If you want to knockback all units near the caster, you can simply use pick function and apply the initial effects on nearby units. Here I'm using the individual custom unit value to check remaining knockback power.

  • Knockback Trigger
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Knockback
    • Actions
      • Set TempPoint1 = (Position of (Triggering unit))
      • Set TempPoint2 = (Position of (Target unit of ability being cast))
      • Unit Group - Add (Target unit of ability being cast) to Knockbackers
      • Unit - Set the custom value of (Target unit of ability being cast) to (12 + ((12 x (Level of Knockback for (Triggering unit))) - (Level of (Target unit of ability being cast))))
      • Unit - Make (Target unit of ability being cast) face (Angle from TempPoint2 to TempPoint1) over 0.00 seconds
      • Custom script: call RemoveLocation(udg_TempPoint1)
      • Custom script: call RemoveLocation(udg_TempPoint2)
  • Knockback Effect
    • Events
      • Time - Every 0.02 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in Knockbackers and do (Actions)
        • Loop - Actions
          • Set TempPoint = (Position of (Picked unit))
          • Unit - Move (Picked unit) instantly to (TempPoint offset by (Real((Custom value of (Picked unit)))) towards ((Facing of (Picked unit)) + 180.00) degrees)
          • Unit - Set the custom value of (Picked unit) to ((Custom value of (Picked unit)) - 1)
          • Custom script: call RemoveLocation(udg_TempPoint)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Custom value of (Picked unit)) Equal to 0
            • Then - Actions
              • Unit Group - Remove (Picked unit) from Knockbackers
            • Else - Actions
 
Level 4
Joined
May 29, 2008
Messages
92
Big Thanks. But how can i bo that whis units that are jnly infrant of unit (90 degrees fo example)
 
Level 13
Joined
Nov 22, 2006
Messages
1,260
Well, you can put an invisible unit in front of the caster and apply that knockback to all (enemy) units in, lets say, 500 range of that invisible unit.

I once tried to make a code that gets all the units in front (or behind) of a unit, but no...... it's hard as hell, at least for me.
 
Level 4
Joined
May 29, 2008
Messages
92
My problem a bit easy: he knokback only ubit he attack, and he has third spell of pit lord (I dont know how this spell called in English version:sad:) So it has splash attack
 
Status
Not open for further replies.
Top