• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Userfriendliest and bugleast Knockback System

Level 11
Joined
Nov 4, 2007
Messages
337
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
 
Level 18
Joined
Oct 18, 2007
Messages
930
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
 
Level 6
Joined
Nov 10, 2006
Messages
181
http://www.hiveworkshop.com/forums/f414/extended-knockback-system-122452/#post1067276

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?
 
Top