• 🏆 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!

issue with walkability checking

Status
Not open for further replies.
Level 11
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

upload_2020-10-19_23-28-10.png





situation after knockback

upload_2020-10-19_23-28-26.png









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?

upload_2020-10-19_23-29-14.png










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









upload_2020-10-19_23-31-37.png
 

Attachments

  • upload_2020-10-19_23-22-49.png
    upload_2020-10-19_23-22-49.png
    252.8 KB · Views: 18
  • upload_2020-10-19_23-23-14.png
    upload_2020-10-19_23-23-14.png
    513.5 KB · Views: 15
  • upload_2020-10-19_23-23-39.png
    upload_2020-10-19_23-23-39.png
    432.3 KB · Views: 20
  • Raging Slam v1.10.w3x
    33.8 KB · Views: 22
Status
Not open for further replies.
Top