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

Deal damage to Units Inside Orc Burrow

Status
Not open for further replies.

Uncle

Warcraft Moderator
Level 73
Joined
Aug 10, 2018
Messages
7,887
Here you go, the system works like a charm but I'm sure there will be some rare edge cases that I'm overlooking.

I'm using a Unit Indexer to link the cargo units to their transports as well as to link a Unit Group to each transport. When a transport takes damage it loops over it's linked Unit Group and deals the same amount of damage to the cargo contained inside.

There's also a hidden passive ability that is used to define which transport (units with cargo abilities) will use this system. Simply add the ability to your Orc Burrow and you should be good to go. Also, make sure to set the TDS_Class variable in the TDS Create Group Preplaced trigger to this ability, otherwise the triggers won't work since they reference this variable throughout.
 

Attachments

  • Transport Damage System 1.w3m
    27.3 KB · Views: 4
Last edited:
I guess you need a unit indexer that checks (via groups or somehow) which units are in the burrow/bunker and if the bunker gets damaged or whatever, the units inside also get damage or whatever via triggers.
Seems to be the case. I'll take this as a lead.
Have you tried tinkering with the Devour Cargo ability? I know it deals damage to transported units, so perhaps adding/removing it to burrows when they're attacked?
The idea is that it response to on damage, so I am not sure if it is an ideal approach.
Here you go, the system works like a charm but I'm sure there will be some rare edge cases that I'm overlooking.

I'm using a Unit Indexer to link the cargo units to their transports as well as to link a Unit Group to each transport. When a transport takes damage it loops over it's linked Unit Group and deals the same amount of damage to the cargo contained inside.

There's also a hidden passive ability that is used to define which transport (units with cargo abilities) will use this system. Simply add the ability to your Orc Burrow and you should be good to go. Also, make sure to set the TDS_Class variable in the TDS Create Group Preplaced trigger to this ability, otherwise the triggers won't work since they reference this variable throughout.
Thanks. I'll take a look. This seems to be the closest approach and I think I can tune it to suit the exact needs.
 

Uncle

Warcraft Moderator
Level 73
Joined
Aug 10, 2018
Messages
7,887
Seems to be the case. I'll take this as a lead.

The idea is that it response to on damage, so I am not sure if it is an ideal approach.

Thanks. I'll take a look. This seems to be the closest approach and I think I can tune it to suit the exact needs.
It should do exactly what you mentioned in your op. Simply change the Damage trigger to check if the (Damage source) is equal to your Riot Trooper and Add the TDS_Class ability to any Structures that you want to work with it.
 
Status
Not open for further replies.
Top