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