1. A slave to two rhythms, the 22nd Terraining Contest is here.
    Dismiss Notice
  2. The heavens smile on the old faithful. The 16th Techtree Contest has begun.
    Dismiss Notice
  3. The die is cast - the 6th Melee Mapping Contest results have been announced. Onward to the Hive Cup!
    Dismiss Notice
  4. The glory of the 20th Icon Contest is yours for the taking!
    Dismiss Notice
  5. Shoot to thrill, play to kill. Sate your hunger with the 33rd Modeling Contest!
    Dismiss Notice
  6. Do you hear boss music? It's the 17th Mini Mapping Contest!
    Dismiss Notice
  7. 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:
    894
    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:
    894
    Resources:
    1
    Spells:
    1
    Resources:
    1
    Thanks guys. I'll test it.