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

Exploding Barrels

Status
Not open for further replies.
Level 3
Joined
Jan 4, 2010
Messages
42
Hi.

I have many "Barrel of Explosives" that is standing next to each others.
If one of them is attacked and killed it will explode, but i want all the others to explode too. Not all at once but like a chain-reaction. (if you understand me)

Happy for help :wink:

Edit: I also want units/buildings close to the barrels to die, or get hurt
 
Last edited:
Level 16
Joined
May 1, 2008
Messages
1,605
Seas =)

  • Boom
    • Events
      • Destructible - A destructible within (Playable map area) dies
    • Conditions
      • (Destructible-type of (Dying destructible)) Equal to Barrel of Explosives
    • Actions
      • Trigger - Turn off (This trigger)
      • -------- Destroy the other Barrels ( I used 250 range ) --------
      • Set TempPoint1 = (Position of (Dying destructible))
      • Destructible - Pick every destructible within 250.00 of TempPoint1 and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Destructible-type of (Picked destructible)) Equal to Barrel of Explosives
            • Then - Actions
              • Destructible - Kill (Picked destructible)
            • Else - Actions
      • -------- Now we damage the units around it ( I use 250 damage ) --------
      • Custom script: set bj_wantDestroyGroup = true
      • Unit Group - Pick every unit in (Units within 250.00 of TempPoint1) and do (Actions)
        • Loop - Actions
          • Unit - Cause (Picked unit) to damage (Picked unit), dealing 250.00 damage of attack type Spells and damage type Normal
      • Custom script: call RemoveLocation(udg_TempPoint1)
      • Trigger - Turn on (This Trigger)
 
Level 3
Joined
Jan 4, 2010
Messages
42
I don't know if you or I failed...

But i can't make this work.. :cry:


I made the trigger exactly as you wrote but still isn't working...

Check if you did something wrong.
Thanks anyway.
 
Level 16
Joined
May 1, 2008
Messages
1,605
Seas =)

That's no problem, but I tested it again and it works for me.

Anyway I give you the small test map, so you can copy the trigger or get a closer look for any difference.

( I use the Destructible "Barrel of Explosives" - if you use another Destructible you have to change it )
( This work only with Destructibles not with Doodads - get a look what you are using )
 

Attachments

  • Boom.w3x
    16.7 KB · Views: 99
Level 3
Joined
Jan 4, 2010
Messages
42
Thanks, will test this...

Edit:

Scary....
It isn't working though i copied the trigger from your map. (Must be something with the barrels.)
And I think I'm using the right destructible.

Also in you own map the effect is not blowing up all barrels (if you add more barrels (longer away from TempPoint1) they will not explode...
 
Level 3
Joined
Jan 4, 2010
Messages
42
Dr. Boom does not work, it will not cause a chain reaction like he wants.

Basically what you are after is putting a small wait (TriggerSleepAction(x)) inside the actions so that when the barrel dies it damages nearby units then waits. After the wait it then kills all nearby barrlels.

This is correct.

Can you please modify the trigger so it will cause a "chain"reaction? (and working, cause i cant make it work...)
:con:
 
Level 6
Joined
Feb 27, 2008
Messages
222
Seas =)

  • Boom
    • Events
      • Destructible - A destructible within (Playable map area) dies
    • Conditions
      • (Destructible-type of (Dying destructible)) Equal to Barrel of Explosives
    • Actions
      • Trigger - Turn off (This trigger)
      • -------- Destroy the other Barrels ( I used 250 range ) --------
      • Set TempPoint1 = (Position of (Dying destructible))
      • Destructible - Pick every destructible within 250.00 of TempPoint1 and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Destructible-type of (Picked destructible)) Equal to Barrel of Explosives
            • Then - Actions
              • Destructible - Kill (Picked destructible)
            • Else - Actions
      • -------- Now we damage the units around it ( I use 250 damage ) --------
      • Custom script: set bj_wantDestroyGroup = true
      • Unit Group - Pick every unit in (Units within 250.00 of TempPoint1) and do (Actions)
        • Loop - Actions
          • Unit - Cause (Picked unit) to damage (Picked unit), dealing 250.00 damage of attack type Spells and damage type Normal
      • Custom script: call RemoveLocation(udg_TempPoint1)
      • Trigger - Turn on (This Trigger)

Wonder why it doesnt work. Maybe because you turn off the trigger when it starts?

Anyway, i'd use the exact trigger Dr. Boom used with a little change.

When a barrel of explosives dies, it deals damage to units around and destroys all barrels in a ... say... 150 range. Each of the barrels will also trigger the trigger, so it should work.

Imma gonna get to work now :)


Edit : After a little thinking, the method i wanted to use seems not to be able to work. I can, however, replace the destructibles with units that have the barrel model, so i can add abilities to them. Is it ok with you?
 
Level 3
Joined
Jan 4, 2010
Messages
42
Seas =)

@EMPerror: I missed the point that he wants a chain reaction not a directly explode but I got something else =)

Ok it isn't the best way I think :wsad: ... but somehow I like it =)

Nice name on the map, will test this now (just got home...)



SWEET MAN!!!! This is just what i wanted!

Ty very much for the BOOM!
+Rep in ages! :wthumbsup:
 
Status
Not open for further replies.
Top