• 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.
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!
  • ✅ The POLL for Hive's Texturing Contest #34 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!
  • ✅ The POLL for Hive's Techtree Contest #20 is OPEN! Vote for the TOP 3 FACTIONS! 🔗Click here to cast your vote!

Userfriendliest and bugleast Knockback System

Changed;
JASS:
private function SetUnitXY takes unit u, real x, real y returns boolean


        
        if (x < minx or x > maxx or y < miny or y > maxy ) then
            return false
        endif
        
        //! CHECK IF LOC IS NOT BLOCKED
        call SetUnitX(Dummy,x)
        call SetUnitY(Dummy,y)
        if ( GetUnitX(Dummy) != x or GetUnitY(Dummy) != y ) then
            return false
        endif
        
    call SetUnitX(u,x)
    call SetUnitY(u,y)
    return true
    
endfunction
 
Changed;
JASS:
private function SetUnitXY takes unit u, real x, real y returns boolean


        
        if (x < minx or x > maxx or y < miny or y > maxy ) then
            return false
        endif
        
        //! CHECK IF LOC IS NOT BLOCKED
        call SetUnitX(Dummy,x)
        call SetUnitY(Dummy,y)
        if ( GetUnitX(Dummy) != x or GetUnitY(Dummy) != y ) then
            return false
        endif
        
    call SetUnitX(u,x)
    call SetUnitY(u,y)
    return true
    
endfunction

You do know that doing the "SetUnitX" and "SetUnitY" totaly ignores the pathing at that location? lol you failed at that part :P

And btw, you should use an item to do the job
 
https://www.hiveworkshop.com/threads/extended-knockback-system.122452/post-1067276

Take a look at my system and learn it from there or just learn through rising_dusk knockback system.

It needs to be made from scratch, your script is really confusing as it is not configurable at all.

I don't see how this is friendly for GUI users who are stuck with the same value for all knockbacks.

Units are supposed to slide in water but with a different effect only.

There are still many points but I am sure that I don't need to list them right?
 
Back
Top