• 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.

Trees are walkable?

Status
Not open for further replies.
Level 13
Joined
Oct 16, 2010
Messages
737
Hi

So I've just started making an indexing system for missile spells and am trying to make them hit obstacles such as cliffs and trees. Problem is that they hit cliffs, but go straight though trees!!! I tried putting in some rocks and they hit them too. Just trees!!!

Here's the movement trigger:

  • Move Dummies
    • Events
      • Time - Every 0.10 seconds of game time
    • Conditions
    • Actions
      • For each (Integer Index_LoopInteger) from 1 to Index_Max, do (Actions)
        • Loop - Actions
          • Set TempPoint = (Position of Index_Dummy[Index_LoopInteger])
          • -------- If environment is in way --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Terrain pathing at TempPoint of type Walkability is off) Equal to True
            • Then - Actions
              • -------- Kill dummy --------
              • Unit - Kill Index_Dummy[Index_LoopInteger]
            • Else - Actions
              • Unit - Move Index_Dummy[Index_LoopInteger] instantly to (TempPoint offset by 25.00 towards (Facing of Index_Dummy[Index_LoopInteger]) degrees)
          • Custom script: call RemoveLocation(udg_TempPoint)
 
Level 12
Joined
Feb 22, 2010
Messages
1,115
Yes, that is why a custom pathing function exist.

(Terrain pathing at TempPoint of type Walkability is off)
^This function only check for static walkability, this means it doesn't check any units, buildings, destructables at given point.Only terrain and doodads etc.

You can search for how to check walkability, or IsTerrainWalkable etc...
 
Status
Not open for further replies.
Top