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

allow certain units to move through buildings

Status
Not open for further replies.
Level 5
Joined
Aug 19, 2015
Messages
68
[solved] allow certain units to move through buildings

hi,
is it possible?
maybe without changing the pathing map of all my 20-30 buildings?
thank you

edit:
solution:
i used tiny spaces in my pathing maps that lets really small units through
 
Last edited:
Level 2
Joined
Sep 16, 2014
Messages
17
Think this will work,just remove Unit Group leak,too lazy to do so:
  • Trigger1
  • Events:
  • Conditions:
  • Actions:
    • Unit - Turn collision for (Entering unit) Off
  • Trigger2
  • Events:
  • Conditions:
  • Actions:
    • Unit - Turn collision for (Entering unit) On
  • Trigger3
  • Events:
  • Map initialization
  • Conditions:
  • Actions:
    • Unit Group - Pick every unit in (Units in (Playable map area)) and do (Actions)
      • Loop - Actions
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • ((Picked unit) is A structure) Equal to True
          • Then - Actions
            • Trigger - Add to Trigger2 <gen> the event (Unit - A unit enters (Region centered at (Position of (Picked unit)) with size ("Building Width", "Building Height")))
            • Trigger - Add to Trigger1 <gen> the event (Unit - A unit leaves (Region centered at (Position of (Picked unit)) with size ("Building Width", "Building Height")))
          • Else - Actions
            • -------- DO NOTHING --------
 
Level 5
Joined
Aug 19, 2015
Messages
68
that makes my units also ignore terrain :/
Maybe pathing maps are worth a try? I have lots of 2x2 structures, is there a pathing map that allows hovering/horse units but not foot units to pass those?

The units who are not allowed to pass those buildings have a pretty huge collision size (2x2, =32), changing the pathing map to a centered 1x1 is ok too i think (still 2x2 build restriction)
 
Last edited:
Level 11
Joined
Aug 24, 2012
Messages
429
If all the buildings in question are pre-placed, you might want to fiddle with pathing-blockers (they can separate flying and ground units).

I don't think there's anything that can separate mounted/hovering/foot though:(
 
Status
Not open for further replies.
Top