1. Updated Resource Submission Rules: All model & skin resource submissions must now include an in-game screenshot. This is to help speed up the moderation process and to show how the model and/or texture looks like from the in-game camera.
    Dismiss Notice
  2. DID YOU KNOW - That you can unlock new rank icons by posting on the forums or winning contests? Click here to customize your rank or read our User Rank Policy to see a list of ranks that you can unlock. Have you won a contest and still havn't received your rank award? Then please contact the administration.
    Dismiss Notice
  3. We have recently started the 16th edition of the Mini Mapping Contest. The theme is mini RPG. Do check it out and have fun.
    Dismiss Notice
  4. Choose your ride to damnation in the 5th Special Effect Contest Poll.
    Dismiss Notice
  5. The winners of the 13th Techtree Contest have been announced!
    Dismiss Notice
  6. The 13th Music Contest Poll is up! Vote for the best tracks in this symphony of frost and flame.
    Dismiss Notice
  7. Race against the odds and Reforge, Don't Refund. The 14th Techtree Contest has begun!
    Dismiss Notice
  8. Check out the Staff job openings thread.
    Dismiss Notice
Dismiss Notice
60,000 passwords have been reset on July 8, 2019. If you cannot login, read this.

Simple trigger is not working

Discussion in 'World Editor Help Zone' started by Qrom Bellascream, Jan 4, 2017.

  1. Qrom Bellascream

    Qrom Bellascream

    Joined:
    Apr 5, 2013
    Messages:
    150
    Resources:
    0
    Resources:
    0
    • 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.
     
  2. IcemanBo

    IcemanBo

    Joined:
    Sep 6, 2013
    Messages:
    6,236
    Resources:
    22
    Maps:
    3
    Spells:
    11
    Template:
    1
    Tutorials:
    4
    JASS:
    3
    Resources:
    22
    Use the other destructiable event. It should be "A destructible dies" or so.

    You use the event which is specified to a region already, and just sucks. It only works for 64 of amount and only for pre-placed ones.
     
  3. Qrom Bellascream

    Qrom Bellascream

    Joined:
    Apr 5, 2013
    Messages:
    150
    Resources:
    0
    Resources:
    0
    There's no way to create a variable or that or anything, it just prompts to select a pre-placed destructible. I guess it's impossible to do in that case. Oh well.
     
  4. IcemanBo

    IcemanBo

    Joined:
    Sep 6, 2013
    Messages:
    6,236
    Resources:
    22
    Maps:
    3
    Spells:
    11
    Template:
    1
    Tutorials:
    4
    JASS:
    3
    Resources:
    22
    Pick all destructibales inside your map on map start and use action "Trigger - Add Event" to add the event "Picked Destructable Dies" to your dest-death trigger.

    When you create new destructables, you can add them there, too.
     
  5. Qrom Bellascream

    Qrom Bellascream

    Joined:
    Apr 5, 2013
    Messages:
    150
    Resources:
    0
    Resources:
    0
    Ahh, I see. Thanks!
     
  6. Qrom Bellascream

    Qrom Bellascream

    Joined:
    Apr 5, 2013
    Messages:
    150
    Resources:
    0
    Resources:
    0
    • 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?
     
  7. IcemanBo

    IcemanBo

    Joined:
    Sep 6, 2013
    Messages:
    6,236
    Resources:
    22
    Maps:
    3
    Spells:
    11
    Template:
    1
    Tutorials:
    4
    JASS:
    3
    Resources:
    22
    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.
     
  8. Qrom Bellascream

    Qrom Bellascream

    Joined:
    Apr 5, 2013
    Messages:
    150
    Resources:
    0
    Resources:
    0
    Ahh, got it working now. I forgot that I could just use the add event action with the "Last Created Unit" parameter.