Make Unit go trough everything except Doodads

Exuro.

New Member
Reaction score
5
Hey

ive now had this running for a long time in the normal helper section, and we have absolutly found out of nothing :D

I need my peasant to be able to go trough every building, but not Doodads..


Things that dont work:
Flying aint an option
Aura´s on towers turning collision off for nearby units
Ghost(visible)
Collision changes
No Pathing map
etc.

We have tried a lot and no solution..


So, can someone please help me and tell me if this is possible in JASS?
Make the unit go trough buildings but not doodads/destructibles?
 

Romek

Super Moderator
Reaction score
963
Well, everything except doodads is just buildings isn't it?

Maybe you could give all buildings a collision size of 0?
 

Exuro.

New Member
Reaction score
5
alrdy been trough all that :)

Will take long time to go trough it all again so if you wish you can read the thread heh:

Link


:D
 

Builder Bob

Live free or don't
Reaction score
249
I would say make the peasant fly again, but then you'd shut it down as something that doesn't work.

Instead, here's a map featuring:
  • Footmen blocked by both buildings and doodads
  • Peasants blocked only by doodads


Edit: Additionally, if you want doodads/buildings that only footmen can go through, use the pathing color Cyan.

Here's a link you might be interested in: Pathing Map Types
 

Exuro.

New Member
Reaction score
5
hmm never rly thought of it that way.. think the flying is working.. will have to test thou :)


but thanks a lot for the good explanation and showing me trough that map..

EDIT: Cant give rep as i alrdy gave you lately hehe
 

Builder Bob

Live free or don't
Reaction score
249
No problem :)

Another solution you might be interested in that requires triggering, is one that uses the function SetTerrainPathable(x, y, pathingType, flag)

pathingType can be
  • PATHING_TYPE_AMPHIBIOUSPATHING
  • PATHING_TYPE_ANY
  • PATHING_TYPE_BLIGHTPATHING
  • PATHING_TYPE_BUILDABILITY
  • PATHING_TYPE_FLOATABILITY
  • PATHING_TYPE_FLYABILITY
  • PATHING_TYPE_PEONHARVESTPATHING
  • PATHING_TYPE_WALKABILITY
flag is true or false, to enable or disable the pathingType.

It would require some kind of system on your part to set the right pathing in the right places, but once it's made you can have a map without flying peasants.

Let's assume you don't use water in your map. Then you can set your peasants pathing type to amphibious, and enable PATHING_TYPE_AMPHIBIOUSPATHING wherever necessary. This won't enable PATHING_TYPE_WALKABILITY, so only the peasants will be able to pass.

Note: if I remember correctly, SetTerrainPathable() changes an area of 32x32
 

Exuro.

New Member
Reaction score
5
well its alrdy working quite nicely now.. :D

cant believe i never did this before :)
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top