AoE Knockback

HalosNTariff

New Member
Reaction score
13
Exactly as the title says; I'm working on a spell which damages all enemy units around the hero and then knocks all units (friend of foe) away from him, with damage and distance increasing with level.

However I'm not really sure how to trigger it, I've got it picking every unit within X of the hero, then I'm not sure on how to move the picked units radially outwards from the hero.

I figure it's something to do with 'polar offset' but I'm not sure what arithmatic is needed to jump units away from the caster...

Anyone know how to do this?
 

Rainther

I guess I should write something of value here...
Reaction score
61
First of all an ability as this one's rather hard to make through GUI. I've made an ability of this kind myself by using vJass and TimerUtils. And by hard I mean making it as flawless as possible.

Basicly you move the affected unit a fixed distance each intervall by the angle between caster and victim through Polar Offset.
PolarOffset(victim, fixed distance, anglebetween(position of caster,position of victim))
 

Dinowc

don't expect anything, prepare for everything
Reaction score
223
First of all an ability as this one's rather hard to make through GUI

I always needed 10 minutes to make sliding abilities in GUI

you need 3 things for that:

1. a MUI counter - which will make the spell MUI by increasing it every time the ability occurs
2. unit's custom value - to keep track of the unit
3. unit group - to get every unit running a slide instance

here's a quick GUI trigger for your spell:

Trigger:
  • trigger1
    • events
      • unit starts the effect of an ability
    • conditions
      • ability being cast equal to xxx
    • actions
      • set CastPos = position of triggering unit
      • set TempGroup = units within 200.00 around triggering unit matching (matching unit is alive equal to true and matching unit belongs to an enemy of owner of triggering unit equal to true and matching unit is a ground unit equal to true)
      • pick every unit in TempGroup and do actions
        • if MUI less than 1000 then
          • set MUI = MUI + 1
        • else
          • set MUI = 0
        • set Pos = position of picked unit
        • set Distance[MUI] = 0.00
        • set Angle[MUI] = angle between CastPos and Pos
        • unit - set the custom value of picked unit to MUI
        • unit group - add picked unit to KnockGroup
        • call RemoveLocation(udg_Pos)
        • call DestroyGroup(udg_TempGroup)



Trigger:
  • trigger2
    • events
      • every 0.03125 seconds of game time
    • conditions
      • number of units in KnockGroup greater than 0
    • actions
      • pick every unit in KnockGroup and do actions
        • set value = custom value of picked unit
        • if Distance[value] less than XXX then
          • set TempPoint = position of picked unit
          • set OffsetPoint = TempPoint offset by XXX towards Angle[value] degrees
          • unit - move picked unit instantly to OffsetPoint
          • set Distance[value] = Distance[value] + XXX
          • call RemoveLocation(udg_TempPoint)
          • call RemoveLocation(udg_OffsetPoint)
        • else
          • unit group - remove picked unit from KnockGroup
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top