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. The Lich King demands your service! We've reached the 19th edition of the Icon Contest. Come along and make some chilling servants for the one true king.
    Dismiss Notice
  4. The 4th SFX Contest has started. Be sure to participate and have a fun factor in it.
    Dismiss Notice
  5. The poll for the 21st Terraining Contest is LIVE. Be sure to check out the entries and vote for one.
    Dismiss Notice
  6. The results are out! Check them out.
    Dismiss Notice
  7. Don’t forget to sign up for the Hive Cup. There’s a 555 EUR prize pool. Sign up now!
    Dismiss Notice
  8. The Hive Workshop Cup contest results have been announced! See the maps that'll be featured in the Hive Workshop Cup tournament!
    Dismiss Notice
  9. 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.

Can someone find the error in my trigger.

Discussion in 'Triggers & Scripts' started by bladerdog, Aug 20, 2012.

  1. bladerdog

    bladerdog

    Joined:
    Aug 26, 2010
    Messages:
    18
    Resources:
    0
    Resources:
    0
    Well don t judge me I only started this a few days ago and I really want to learn it.If you know a better way I could do this please post it instead. Help.JPG
     
  2. rulerofiron99

    rulerofiron99

    Joined:
    Jul 10, 2006
    Messages:
    3,129
    Resources:
    14
    Maps:
    4
    Spells:
    9
    Tutorials:
    1
    Resources:
    14
    Firstly, you can post triggers on the forum by right clicking your trigger -> copy as text, and pasting it here inside
    • tags.
    • Now on to the trigger.
    • You have way too many conditions in there.
    • [IMG]http://www.hiveworkshop.com/forums/attachment.php?attachmentid=117079&stc=1&d=1345491108[/IMG]
    • Remove the conditions as in this picture, and mode the contents of the "Then - Actions" into the trigger itself.
     

    Attached Files:

  3. mckill2009

    mckill2009

    Joined:
    Mar 10, 2009
    Messages:
    4,696
    Resources:
    34
    Maps:
    5
    Spells:
    27
    JASS:
    2
    Resources:
    34
  4. bladerdog

    bladerdog

    Joined:
    Aug 26, 2010
    Messages:
    18
    Resources:
    0
    Resources:
    0
  5. bladerdog

    bladerdog

    Joined:
    Aug 26, 2010
    Messages:
    18
    Resources:
    0
    Resources:
    0
    I followed your instuctions but it still isnt working well. The unit transforms into the swordman but not into the archer and if I remove the conditions you suggested the unit splits into an archer and a swordman.I spend a few hours trying different things to fix the trigger but it all ends up the same either the trigger has no effect or the split thing happens.


    • Untitled Trigger 001
      • Events
        • Unit - Villager 0014 <gen> Uses an item
      • Conditions
        • Or - Any (Conditions) are true
          • Conditions
      • Actions
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • (Item-class of (Item being manipulated)) Equal to (Item-class of Bow 0001 <gen>)
            • (Item-class of (Item being manipulated)) Equal to (Item-class of Iron Sword 0002 <gen>)
          • Then - Actions
            • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              • If - Conditions
                • (Item-type of (Item being manipulated)) Equal to (Item-type of Bow 0001 <gen>)
              • Then - Actions
                • Unit - Replace (Triggering unit) with a (Unit-type of Sylvanas Windrunner 0017 <gen>) using The new unit's default life and mana
              • Else - Actions
            • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              • If - Conditions
                • (Item-type of (Item being manipulated)) Equal to (Item-type of Iron Sword 0002 <gen>)
              • Then - Actions
                • Unit - Replace (Triggering unit) with a (Unit-type of Swordsman 0016 <gen>) using The new unit's default life and mana
              • Else - Actions
          • Else - Actions
     
  6. SpizZ

    SpizZ

    Joined:
    May 17, 2011
    Messages:
    10
    Resources:
    0
    Resources:
    0
    Hmm If I am not mistaken you should remove the first conditions so its like:

    • Events
      • Unit - Villager 0014 <gen> Uses an item
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Item-type of (Item being manipulated)) Equal to (Item-type of Bow 0001 <gen>)
        • Then - Actions
          • Unit - Replace (Triggering unit) with a (Unit-type of Sylvanas Windrunner 0017 <gen>) using The new unit's default life and mana
        • Else - Actions
          • Do Nothing
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Item-type of (Item being manipulated)) Equal to (Item-type of Iron Sword 0002 <gen>)
        • Then - Actions
          • Unit - Replace (Triggering unit) with a (Unit-type of Swordsman 0016 <gen>) using The new unit's default life and mana
        • Else - Actions
          • Do Nothing


    I hope I helped :3
     
  7. mckill2009

    mckill2009

    Joined:
    Mar 10, 2009
    Messages:
    4,696
    Resources:
    34
    Maps:
    5
    Spells:
    27
    JASS:
    2
    Resources:
    34
    Remove those first 4 conditions on posted by rulerofiron99 and...

    This is better...
    • Events
      • Unit - Villager 0014 <gen> Uses an item
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Item-type of (Item being manipulated)) Equal to (Item-type of Bow 0001 <gen>)
        • Then - Actions
          • Unit - Replace (Triggering unit) with a (Unit-type of Sylvanas Windrunner 0017 <gen>) using The new unit's default life and mana
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Item-type of (Item being manipulated)) Equal to (Item-type of Iron Sword 0002 <gen>)
            • Then - Actions
              • Unit - Replace (Triggering unit) with a (Unit-type of Swordsman 0016 <gen>) using The new unit's default life and mana
          • Else - Actions