• 🏆 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!

Simple trigger is not working

Status
Not open for further replies.
Level 6
Joined
Apr 5, 2013
Messages
154
  • SpiritTreeChopped
    • Events
      • Destructible - A destructible within (Playable map area) dies
    • Conditions
      • Or - Any (Conditions) are true
        • Conditions
          • (Destructible-type of (Dying destructible)) Equal to Ashenvale Canopy Tree (SPAWNED)
          • (Destructible-type of (Dying destructible)) Equal to Ashenvale Canopy Tree (SPAWNED)
    • Actions
      • Destructible - Remove (Dying destructible)
My map has a spirit tree unit with the ability to spawn trees, to be chopped down by workers. As you can see, I want it to be so that the chopped trees don't leave stumps behind, but the trigger isn't working. What's wrong with it? It should be able to work, really.
 
Level 6
Joined
Apr 5, 2013
Messages
154
  • Spirit Tree
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Spawn Tree
    • Actions
      • Destructible - Create a Ashenvale Canopy Tree (SPAWNED) at ((Position of (Triggering unit)) offset by 200.00 towards (Random real number between 0.00 and 360.00) degrees) facing (Random angle) with scale (Random real number between 1.00 and 1.20) and variation (Random integer number between 0 and 3)
      • Special Effect - Create a special effect at (Position of (Last created destructible)) using Objects\Spawnmodels\NightElf\NEDeathSmall\NEDeathSmall.mdl
      • Special Effect - Destroy (Last created special effect)
      • Destructible - Pick every destructible in (Playable map area) and do (Actions)
        • Loop - Actions
          • Trigger - Add to SpiritTreeChopped <gen> the event (Destructible - (Picked destructible) dies)
  • SpiritTreeChopped
    • Events
    • Conditions
      • (Destructible-type of (Dying destructible)) Equal to Ashenvale Canopy Tree (SPAWNED)
    • Actions
      • Destructible - Remove (Dying destructible)
Wont this cause quite alot of lag?
 
You only "Pick all destribales" once on map start.

Later, like when you create a new tree, you don't need to again register all destructibales, but only the last created one. ;)

By the way, in the trigger at map start, where you register "all" destructiables, you may add a condition to check if picked destrictable is actually a tree or not, because there are maybe also a lot of other destructables inside your map which you don't need to have registered.
 
Status
Not open for further replies.
Top