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

destructible object die

Status
Not open for further replies.
Level 11
Joined
Jun 15, 2011
Messages
447
Why? Will more than 64 destructables die in your map?

But you can also make more events. The more events, the more destructables detected.

Like this:

Events -
Destructable in (playable map area) dies
Destructable in (playable map area) dies
Destructable in (playable map area) dies
Destructable in (playable map area) dies

In this way, the event will detect different dying destructables... Even more than 64.
 
Level 28
Joined
Sep 26, 2009
Messages
2,520
It does not calculate the first 64 destructibles, but you are right, it does count only 64. For some reason, when destructible dies, the trigger sometimes simply doesn't fire - dunno why.

In my test map, I made 501 destructibles (trees) and through periodic trigger I destroyed them one by one until none was left. One of the last trees that has been destroyed triggered the event for the 64th time.

Maybe if you kill destructibles too quickly, they don't fire the trigger?


Edit:
....
Destructable in (playable map area) dies
Destructable in (playable map area) dies
Destructable in (playable map area) dies
Destructable in (playable map area) dies
....
This does not work, tried that, but this only multiplies the number of times one trigger is fired - i.e. in my map with 501 destructibles, the counter I use when "destructible in area dies" went up to 640. Note that I had the event copied 10 times, so in the end it was 64 destructibles that fired the trigger and each did it 10 times.
 
Level 23
Joined
Apr 16, 2012
Messages
4,041
you could store every destructable in array and periodically check if their health is <= 0.405(considered dead, at least for units), but if you have >8190 destructables, it wont work and if you have >200 destructables it would lag if you made the loop too often(I would prefer checking 0.8 secs or so maybe)
 
Level 28
Joined
Sep 26, 2009
Messages
2,520
You don't need to store them. Use action Trigger - Add new event on map ini: like this:

  • MapIni
    • 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 fires when destructible dies.
Your_Trigger will then fire when only *specific* destructible dies and fires correctly.

(note that even though it fires when specific destructible dies, you add every destructible into the list, so it will fire whenever any destructible dies)

You can specify which destructibles you want to add into Your_Trigger's event through If/Then/Else in the destructible loop.
 
Level 4
Joined
Mar 29, 2012
Messages
61
a little problem)) where can i find Trigger - Add to Your_Trigger [the event]
image.png
 
Level 26
Joined
Aug 18, 2009
Messages
4,097
Destructible Within Region Dies picks the first 64 trees/destructables when the event is being created --> on map initialization if it's inside the events-block in GUI. The event is internally the same as single Destructible Dies, just it's applied to each one.

In reality, you can register any amount of Destructable Dies events on a single trigger. Blizzard just implemented a limit to not have huge loops seemingly. So yeah, do it as Nichilus has shown.

@edo494:

you could store every destructable in array and periodically check if their health is <= 0.405(considered dead, at least for units)

First, the limit of death is not the same for different widget types (0.405 for units and I believe 0.401 for items and destructables). Second, a unit dies when it drops below 0.405 but as soon as it dies, the life is set to 0. Also, there are some features that can affect a unit's life while dead without it being resurrected. So that's not reliable and a common misconception.

@Ahotnik001: Seems like you use some addon. UMSWE is outdated btw. Look if there is another category for triggers. Most actions shown there are not available in the normal GUI.
 
Level 11
Joined
Jun 15, 2011
Messages
447
This does not work, tried that, but this only multiplies the number of times one trigger is fired - i.e. in my map with 501 destructibles, the counter I use when "destructible in area dies" went up to 640. Note that I had the event copied 10 times, so in the end it was 64 destructibles that fired the trigger and each did it 10 times.

Oh, I forgot about the actions... So even it worked, the trigger will then do 10x actions which isn't good. My bad.

@Ahotnik
those are some weird WE characters.
 
Status
Not open for further replies.
Top