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

Detecting Dying destructible?

Status
Not open for further replies.
Level 5
Joined
Feb 19, 2008
Messages
110
Hi :)
Im trying to make this "mining" map, where you control a group of miners that destroy rock cunks to mine different minerals.

But! Im having trouble finding a "trigger event" that detects when a Rock Cunk is destroyed, i have tried;
  • Destructible-A destructible within playable map area dies
, but it doesn't seem to work.

Anyone have an easy solution to this? :)
 
Level 5
Joined
Feb 19, 2008
Messages
110
Aye, i did...
I'll make it a unit then! It'll just be a little more work randomizing the look on the chunks. Thanks anyway! :)
 
Level 28
Joined
Sep 26, 2009
Messages
2,520
Make it a specific destructible event - "<specific destructible> dies" instead of Destructible in region dies. The reason is that upon map loading only 64 destructibles that are loaded first in a region will fire this event - you probably have more than 64 destructibles in your map.
 
Level 5
Joined
Feb 19, 2008
Messages
110
But then i have to select a spesific chunk of rock for that trigger? Any way to make it generetic?
 
Level 28
Joined
Sep 26, 2009
Messages
2,520
Get rid of the event "Destructible in region dies" and leave it blank (without any event). Then create new trigger that fires at map ini - like this:
  • Map Ini
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Destructible - Pick every destructible in (Playable map area) and do (Actions)
        • Loop - Actions
          • Trigger - Add to Your_Trigger the event (Destructible - (Picked destructible) dies)
Your_Trigger is the trigger that previously had "Destructible in region dies" event. What the trigger above does is it adds the event "destructible dies" into another trigger.
 
Status
Not open for further replies.
Top