- Joined
- Jul 17, 2013
- Messages
- 544
hey i have been trying to create a walkability system and add it to the knockback. so the unit cannot get thrown into blocked areas, units pathning is also disabled during knockback
situation before knockback
situation after knockback
when i click to move with unit he gets teleported out of tress, but i am afraid it can teleport sometimes him inside tress how can i fix such issue?
againts cliffs it works okay, it doesnt let unit to go on cliff, just tress seems to have a problem
heres the map note map comes from section spells, the dev of it died so he cant fix it
i am also sending the code to check if area is walkable
function IsPointWalkable takes real x, real y returns boolean
local real X
local real Y
local item I = CreateItem('sehr', x, y)
set X = GetItemX(I)
set Y = GetItemY(I)
call RemoveItem(I)
return X-x <= 0.125 and Y-y <= 0.125
endfunction
situation before knockback
situation after knockback
when i click to move with unit he gets teleported out of tress, but i am afraid it can teleport sometimes him inside tress how can i fix such issue?
againts cliffs it works okay, it doesnt let unit to go on cliff, just tress seems to have a problem
heres the map note map comes from section spells, the dev of it died so he cant fix it
i am also sending the code to check if area is walkable
function IsPointWalkable takes real x, real y returns boolean
local real X
local real Y
local item I = CreateItem('sehr', x, y)
set X = GetItemX(I)
set Y = GetItemY(I)
call RemoveItem(I)
return X-x <= 0.125 and Y-y <= 0.125
endfunction