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.

Trigger does not work.

Discussion in 'Triggers & Scripts' started by Airandius, Jul 10, 2010.

  1. Airandius

    Airandius

    Joined:
    Jun 12, 2007
    Messages:
    1,238
    Resources:
    3
    Icons:
    1
    Maps:
    1
    Tutorials:
    1
    Resources:
    3
    This lil bugger wont work, my question is what did I do wrong.

    • Unit Trained
      • Events
        • Unit - A unit Sells a unit
      • Conditions
      • Actions
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • (Unit-type of (Selling unit)) Equal to Tavern
            • (Unit-type of (Selling unit)) Equal to Tavern
            • (Unit-type of (Selling unit)) Equal to Tavern
            • (Unit-type of (Selling unit)) Equal to Tavern
          • Then - Actions
            • Unit - Kill (Buying unit)
            • Set TempLocHS = (Center of Ressurect Light <gen>)
            • Camera - Pan camera for (Owner of (Buying unit)) to TempLocHS over 0.00 seconds
            • Unit - Move (Sold unit) instantly to TempLocHS
            • Special Effect - Create a special effect at TempLocHS using Abilities\Spells\Human\Resurrect\ResurrectTarget.mdl
            • Special Effect - Destroy (Last created special effect)
            • Custom script: call RemoveLocation(udg_TempLocHS)
          • Else - Actions
            • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              • If - Conditions
                • (Unit-type of (Selling unit)) Equal to Tavern
                • (Unit-type of (Selling unit)) Equal to Tavern
                • (Unit-type of (Selling unit)) Equal to Tavern
                • (Unit-type of (Selling unit)) Equal to Tavern
              • Then - Actions
                • Unit - Kill (Buying unit)
                • Set TempLocHS = (Center of Ressurect Dark <gen>)
                • Camera - Pan camera for (Owner of (Buying unit)) to TempLocHS over 0.00 seconds
                • Unit - Move (Sold unit) instantly to TempLocHS
                • Special Effect - Create a special effect at TempLocHS using Abilities\Spells\Human\Resurrect\ResurrectTarget.mdl
                • Special Effect - Destroy (Last created special effect)
                • Custom script: call RemoveLocation(udg_TempLocHS)
              • Else - Actions


    I also tried (Unit-type of (Triggering unit)) with no results.

    The idea is that at start you have a wisp that can buy one hero from one of 4 taverns (4 for each team). Once bought this hero goes to his zone and the wisp get's killed.
     
  2. Diehard@Azeroth

    Diehard@Azeroth

    Joined:
    Sep 21, 2007
    Messages:
    483
    Resources:
    1
    Spells:
    1
    Resources:
    1
    Probably a conflicting trigger; you should also try just setting the condition once in the event - condition place. Also unit-type of triggering unit should work, and is more efficient. Just post the map if needed.
     
  3. Airandius

    Airandius

    Joined:
    Jun 12, 2007
    Messages:
    1,238
    Resources:
    3
    Icons:
    1
    Maps:
    1
    Tutorials:
    1
    Resources:
    3
    Oh I see what I did wrong now, the conditions all had to be matched, however only one needs to be matching. Simply solved by the any condition.

    Thanks anyway, even though you were wrong.
     
  4. Diehard@Azeroth

    Diehard@Azeroth

    Joined:
    Sep 21, 2007
    Messages:
    483
    Resources:
    1
    Spells:
    1
    Resources:
    1
    "you should also try just setting the condition once in the event - condition place"
    :p
    btw even if i was wrong it wouldn't be a good gesture to say it is :S

    Anyways can u help me out on the AoA trigger im having a problem with? its math is a bit comlpicated for me. Thanks xD

    P.S: everyone makes mistakes, so its ok lol