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.

Need help with a trigger +Rep

Discussion in 'World Editor Help Zone' started by shinji, May 19, 2012.

  1. shinji

    shinji

    Joined:
    Jul 25, 2011
    Messages:
    893
    Resources:
    1
    Spells:
    1
    Resources:
    1
    Is there a custom script or a trigger that creates an item and give it to hero then move it to slot X ?
     
  2. SUL_OtF

    SUL_OtF

    Joined:
    May 18, 2012
    Messages:
    10
    Resources:
    0
    Resources:
    0
    Yes, of course! There is a number of trigs specialized on items. I think you can handle it yourself, if really tries. Its simple
     
  3. SUL_OtF

    SUL_OtF

    Joined:
    May 18, 2012
    Messages:
    10
    Resources:
    0
    Resources:
    0
    Just go to trig editor and find item trigs
     
  4. Ham Ham

    Ham Ham

    Joined:
    Oct 2, 2006
    Messages:
    1,159
    Resources:
    12
    Models:
    9
    Maps:
    3
    Resources:
    12
    Assuming that you already have the basic notions of trigger structure, and what is a trigger's event, condition, and action, all you need is, to after setting all the desirable events and conditions for giving the item to the hero, you need to use the the action:

    • Events
    • Hero - Create Item For Hero
     
  5. ForeverBeADragon

    ForeverBeADragon

    Joined:
    Oct 20, 2011
    Messages:
    128
    Resources:
    0
    Resources:
    0
    As far as I know, you should combine a lot of action to do it...
    Example
    • Actions
      • For each (Integer A) from 1 to X, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Item carried by YourUnit in slot (Integer A)) Equal to No item
            • Then - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Integer A) Equal to X
                • Then - Actions
                  • Hero - Create YourItem and give it to YourUnit
                • Else - Actions
                  • Hero - Create DummyItem and give it to YourUnit
            • Else - Actions
      • For each (Integer A) from 1 to 6, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Item carried by YourUnit in slot (Integer A)) Equal to DummyItem
            • Then - Actions
              • Item - Remove (Item carried by YourUnit in slot (Integer A))
            • Else - Actions
     
  6. shinji

    shinji

    Joined:
    Jul 25, 2011
    Messages:
    893
    Resources:
    1
    Spells:
    1
    Resources:
    1
    Thanks guys. I'll test it.