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 haven't received your rank award? Then please contact the administration.
    Dismiss Notice
  3. Ride into the sunset with the 32nd Modeling Contest.
    Dismiss Notice
  4. This adventure has come to an end. Congratulate our heroes in the 16th Mini Mapping Contest Results.
    Dismiss Notice
  5. From the gates of hell, the 5th Special Effect Contest Results have emerged.
    Dismiss Notice
  6. Race against the odds and Reforge, Don't Refund. The 14th Techtree Contest has begun!
    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.

Item Count

Discussion in 'World Editor Help Zone' started by Lee_Go, Nov 29, 2009.

  1. Lee_Go

    Lee_Go

    Joined:
    May 1, 2009
    Messages:
    156
    Resources:
    0
    Resources:
    0
    I know this is simple but I can't figure out a good way to have it so when a unit has all 5 of an item in its inventory it does action. I'm not sure the "Event" for it.
     
  2. Dr. Boom

    Dr. Boom

    Joined:
    May 1, 2008
    Messages:
    1,550
    Resources:
    3
    Maps:
    1
    Spells:
    1
    Tutorials:
    1
    Resources:
    3
    Seas =)

    maybe you can use
    • Events:
      • Unit - A Unit acquires an item


    Then you can count how much items he has already and what type of item it is (conditions) and so on ....
     
  3. Lee_Go

    Lee_Go

    Joined:
    May 1, 2009
    Messages:
    156
    Resources:
    0
    Resources:
    0
    Blah, i need to know how to have it so if a unit has all 5 items on him he completes the quest. What are the conditions to check he has those all 5 items.
     
  4. Maker

    Maker

    Joined:
    Mar 6, 2006
    Messages:
    9,181
    Resources:
    17
    Maps:
    2
    Spells:
    14
    Tutorials:
    1
    Resources:
    17
    • Untitled Trigger 001
      • Events
        • Unit - A unit Acquires an item
      • Conditions
        • Or - Any (Conditions) are true
          • Conditions
            • (Item-type of (Item being manipulated)) Equal to Orb of Frost
            • (Item-type of (Item being manipulated)) Equal to Mask of Death
            • (Item-type of (Item being manipulated)) Equal to Crown of Kings +5
            • (Item-type of (Item being manipulated)) Equal to Claws of Attack +15
            • (Item-type of (Item being manipulated)) Equal to Kelen's Dagger of Escape
        • ((Triggering unit) has an item of type Orb of Frost) Equal to True
        • ((Triggering unit) has an item of type Mask of Death) Equal to True
        • ((Triggering unit) has an item of type Crown of Kings +5) Equal to True
        • ((Triggering unit) has an item of type Claws of Attack +15) Equal to True
        • ((Triggering unit) has an item of type Kelen's Dagger of Escape) Equal to True
      • Actions
        • Unit - Kill (Triggering unit)


    In this trigger, when the unit picks up any of those five items and he already has the other four he will die.
     
  5. Lee_Go

    Lee_Go

    Joined:
    May 1, 2009
    Messages:
    156
    Resources:
    0
    Resources:
    0
    Thank you, oh and does this work for the same items? ... Nvm it probably does, i'm trying it now thank, +rep.
     
  6. Maker

    Maker

    Joined:
    Mar 6, 2006
    Messages:
    9,181
    Resources:
    17
    Maps:
    2
    Spells:
    14
    Tutorials:
    1
    Resources:
    17
    The trigger above works only for five different items.

    This trigger checks if you have five of the same item. If you have, it removes them and creates a new item:

    • Item Create
      • Events
        • Unit - A unit Acquires an item
      • Conditions
      • Actions
        • Set Temp_Unit_1 = (Triggering unit)
        • Set Temp_Integer_1 = 0
        • 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-type of (Item carried by Temp_Unit_1 in slot (Integer A))) Equal to Crown of Kings +5
              • Then - Actions
                • Set Temp_Integer_1 = (Temp_Integer_1 + 1)
              • Else - Actions
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • Temp_Integer_1 Greater than or equal to 5
          • Then - Actions
            • For each (Integer A) from 1 to 5, do (Actions)
              • Loop - Actions
                • Item - Remove (Item carried by Temp_Unit_1 of type Crown of Kings +5)
            • Hero - Create Mask of Death and give it to Temp_Unit_1
          • Else - Actions
     
  7. FlameSoul

    FlameSoul

    Joined:
    Nov 7, 2009
    Messages:
    69
    Resources:
    0
    Resources:
    0
    Do what maker said.