• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[Trigger] Trouble with spawned destructibles

Status
Not open for further replies.
Level 2
Joined
Feb 29, 2008
Messages
6
I have a trigger in my map that creates destructibles when an ability is used. These destructibles are creates, and are supposed to contain items. The items are supposed to spawn upon the death of the destructible.
  • Supply Crates
    • Events
      • Destructible - A destructible within (Playable map area) dies
    • Conditions
      • (Destructible-type of (Dying destructible)) Equal to Supply Crate
    • Actions
      • Item - Create (Random level 1 item-type) at (Position of (Dying destructible))
The problem is that no item is created. However, if I place a "supply crate" destructible on the map in the editor, and then load up the game, the item spawns upon the death of the destructible. Therefore, it seems that only spawned destructibles do not trigger this trigger. I have tried several variations of the trigger that spawns the "supply crate," but have had no luck in getting the item to spawn upon it's death.

Do you guys have any ideas?
 
Level 22
Joined
Feb 26, 2008
Messages
891
Events only register once - when the map loads up.
So, I'm guessing that only the destructables that are on the map at that time get registered.
You should try putting in the action Add Event to Trigger in the trigger that produces the destructables.
Make it the event that (Last Created Destructable) Dies, or whatever fits that trigger.
 
Level 2
Joined
Feb 29, 2008
Messages
6
Thanks, Ghan_04. That was just what it needed, it seems. Everything works fine now. Thanks again.

I hit the +rep, and it never gave me any errors, but according to the rules, I can't give +rep when I have 0, so I don't know if it registered or not.
 
Status
Not open for further replies.
Top