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

[General] Make unit destroy destructibles it walks past?

Level 14
Joined
May 9, 2021
Messages
263
Is it possible to make a unit destroy destructibles (trees, houses, etc.) that it walks past?

I tried to use a Permanent Immolation that targets destructibles but that didn't work...

I've seen it done Tunnels but I've only got a vague Idea of how they might've done it in there.

Also, will this cause lag or any other issues? I'm not 100% sure but Tunnels used to make me lag like crazy after the unit in question was trained.
 
Note that when getting destructible in an area, it's to the destructible's center point. This means if you use too small radius, you cannot hit big destructibles (such as houses because its "center point" is too far away) while you hit the barrels that are "super far" away.

It's possible to counteract this with slightly more complex triggers though.

Also: Abilities typically handles this without you having to deal with it. This is mostly an issue if you have both big and small destructibles that you want to get (and destroy) with triggers.
 

Uncle

Warcraft Moderator
Level 73
Joined
Aug 10, 2018
Messages
7,872
Here's a map I threw together, it's lacking a lot but shows off an attempt at something cool.

The system uses an array of Rows which each contain an array of Tiles (the standard "Large Grid" boxes) which each contain "all" nearby Destructibles. It currently only works with a reasonable search Radius like 256.00 but that's just because I didn't bother making it more dynamic.

There's a chance it's even less efficient than just relying on Pick Every Destructible, I'm not sure... I was experiencing occasional fps drops but it seemed more like a garbage collection problem than anything else. Also, the test map is very small which is likely helping a lot.
 

Attachments

  • Destructible Finder 1.w3m
    25.9 KB · Views: 2
Top