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. Dismiss Notice
  5. The Highway to Hell has been laid open. Come along and participate in the 5th Special Effect Contest.
    Dismiss Notice
  6. 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.

IDS (Infinite Number of Item Classes)

Discussion in 'Trigger (GUI) Editor Tutorials' started by -Kobas-, Mar 29, 2010.

  1. -Kobas-

    -Kobas-

    Joined:
    Jan 17, 2010
    Messages:
    5,895
    Resources:
    28
    Icons:
    1
    Tools:
    2
    Maps:
    10
    Spells:
    4
    Template:
    5
    Tutorials:
    6
    Resources:
    28
    Item Drop System by -Kobas-
    Item Drop System
    by -Kobas-


    Requirements

    * Basic knowledge of the Object Editor
    * Basic knowledge of the Trigger Editor
    * Poor knowledge in variables.
    * A moment of your time :) (Around 5 min).

    Introduction

    Have you ever wondered what the Item Drop System (IDS) is? If your answer is ‘no’, then allow me to explain it for you:

    If you’ve ever played a map such as Gaia's retaliation, you know that you are allowed to carry only 1 item of the same type (Weapon, Armor, etc.). Meaning, that if a player picks up an item of a type which was already in his inventory, it will be automatically dropped, and therefore player will be un-able to carry two items of this type simultaneously. It's simple as that! :)

    How does my system works?


    My system utilizes item levels in order to make item classes which you will use in your map. Therefore, the number of your item classes will greatly increase! How is that possible?
    Let me explain: You can only have 7 item classes (by default in World Editor) whereas item levels can be indefinite!

    And here’s an example:

    Worse Way Better Way
    1. Permanent = Weapon
    2. Campaign = Armor
    3. Power Up = Helm
    4. Purchasable = Shield
    5. Miscellaneous = Misc
    6. Artifact = Artifact
    7. Charged = Potion
    1. Level 1 = Weapon
    2. Level 2 = Armor
    3. Level 3 = Helm
    10. Level 10 = Shield
    25. Level 25 = Misc
    10. Level 100 = Artifact
    999. Level 999 = Material


    You must be wondering: “That sounds great, but isn’t 8th a maximum item level?” Allow me to show you some magic:
    1) Select any item (class and item level in this case doesn't matter)
    2) Select the field that indicates the item level
    3) Press Shift+Enter
    4) Now enter any value you want to be the new maximum item level

    Using that, you can also set many other options as well, such as: negative hit and mana point regeneration, influence of auras (to reduce or increase damage, attack or movement speed, armor…), ect. You’ll agree with me when I say that it’s a very useful thing!

    And for the end I will show you how to stack some items :D

    Let's start!

    1. Okay, let’s start making our IDS now! I know, you will maybe be surprised as how to make an entire system and pack it into a single trigger, well it’s impossible! And here’s an example why:

    A) Imagine we have a 100 item classes; that means that the trigger would have a 100 parts with each one containing at least 5 commands; that’s 500 commands (or 100 Microsoft Word pages if you want)! Therefore, it’s impossible to make the IDS, not to mention what happens with 1 000 or 1 000 000 item classes.
    B) On the other hand, a system can be made with more ways than one: it can be sqeezed into a lot smaller and much more complicated code (I really don’t want to get into that), or it can be separated into several, simpler, triggers. Basically, it can be exactly like you need (want) it to be which is a plus because you can adjust it to your needs.

    That’s why I’ll try my best to explain to you the essense of making a IDS trigger!

    2. You can now open your map to test the new code we’re making.

    3. Create a new trigger and, of course, choose a name for it.

    4. Once you’ve done that, copy this code in it (in other words, make your trigger looking like this one here).

    • Item System
      • Events
        • Unit - A unit Acquires an item
      • Conditions
      • Actions
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • (Item level of (Item being manipulated)) Equal to 1
          • Then - Actions
            • Set Item = 0
            • For each (Integer Item_Slot) from 1 to 6, do (Actions)
              • Loop - Actions
                • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                  • If - Conditions
                    • (Item level of (Item carried by (Hero manipulating item) in slot (Item_Slot))) Equal to 1
                  • Then - Actions
                    • Set Item = (Item + 1)
                  • Else - Actions
            • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              • If - Conditions
                • Item Greater than 1
              • Then - Actions
                • Hero - Drop (Item being manipulated) from (Hero manipulating item)
                • Game - Display to (All players) the text: You can carry only one level 1 item!
              • Else - Actions
          • Else - Actions

    5. You noticed that this trigger uses item level 1. So let’s set the levels of all items on which the trigger will affect to a value of 1 (other levels are not important to us right now)

    6. Save the map and go ahead and test it. You will notice that the trigger doesn’t allow you to carry two items of level 1! If that’s the case, then you succeeded in making an IDS! Congratulations!

    Now you might be thinking:

    1. “Hey, this is so easy! How come I didn’t think of it before?!” If you’re thinking like this, then you already know enough about IDS to make one yourself. And there are a few ways to do it from this tutorial:

    A) Copy the trigger several times and only set your own item levels for your item classes (the easiest, but the most unprofessional way to do it).
    B) Copy the actions inside the trigger and set item levels there (easier, but still an unprofessional way).
    C) Copy the parts of the actions and the rest put under a same condition for all items you can carry in hero’s inventory once or two or even tree or four times... (the hardest, but the most professional way)

    2. “Well I kind of understand what’s all this about, but how to make and set up a trigger by myself?” Well, I made the rest of the tutorial especially for you guys! So read carefully and I’m sure that with a little effort you will learn how the whole system works once you try to set up the trigger I attached on this tutorial.

    1. Trigger Event

    • Events
      • Unit - A unit Acquires an item

    This option can be changed so that it affects a special unit(s) or all units that are controlled by Red (Blue,Teal...Dark Green) player.

    2. Trigger Condition

    • Conditions

    I usually don't use this option but you can add something here as well!
    Example: Add something like this so it only affects Undead units!

    • Conditions
      • ((Hero manipulating item) is Undead) Equal to True

    3. Making The Main Part of The Trigger

    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Item level of (Item being manipulated)) Equal to 1
        • Then - Actions
          • Set Item = 0

    This is the main part of the trigger were you can change values of item Levels which you use like item Classes

    You can change 1 into (0,1...n)

    Also we are now seeing the first variable in our trigger: Item
    You can press Ctrl+B to open a Variable window and then create one simple integer variable (You can name it 'Item' (I use that name here) or anything else you want)

    Note: Will we meet another variable soon!

    4. Item Counter

    • For each (Integer Item_Slot) from 1 to 6, do (Actions)
      • Loop - Actions
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • (Item level of (Item carried by (Hero manipulating item) in slot (Item_Slot))) Equal to 1
          • Then - Actions
            • Set Item = (Item + 1)
          • Else - Actions

    This part of the trigger is used to count the number of items that hero carries (in our case it will count all level 1 items)

    We can now see another variable: Item_Slot (create it like the first one (Item Integer))
    I don't have the time to explain why I use that custom variable instead of just the well known one Integer A, but I will only say that: Integer A (I'm going to ignore Integer B since it is the same as Integer A and both function alike) is a predefined global variable. Thus, the information it might carry while looping could be changed due to any interception by other triggers which also contain Integer A. What happens then - once the looping of the original trigger resumes - is that the value of Integer A is different leading to faulty looping - i.e. bug! (We don't want that now do we :))

    5. Item drop + Text message (or not)

    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • Item Greater than 1
      • Then - Actions
        • Hero - Drop (Item being manipulated) from (Hero manipulating item)
        • Game - Display to (All players) the text: You can carry only one weapon!
      • Else - Actions
    • Else - Actions

    Finally we've come to the last part of the trigger!
    Item Greater than 1 condition defines how many items per class will your hero carry!

    Example: You can change it to 2 for Misc items

    Hero - Drop (Item being manipulated) from (Hero manipulating item)


    This Action will drop the item when a hero tries to pick it up. (Ground below Hero)
    You can also add triggers that can:
    Instantly move an item to any location that you want
    Destroy Item (Why that?)
    Create another item (You have crazy map who knows :))

    Game - Display to (All players) the text: You can carry only one weapon!
    In this case, a text message will be shown to all players who tried to carry two weapon items.

    Can be changed to show:
    Any message to your allies
    Any message to you
    Any message in format of Floating Text
    Any message in Format of Quest Message (Hint, Warning, Quest Update,...)
    Also, you can even delete it if you don't want anything to be written on the screen!

    This is simple and easy to understand I think :)

    6. Example

    This is only one of the many examples of how your trigger can look. This one is used in one silly map!

    About this trigger

    This trigger affect only 1 Player is not MUI!
    (MUI what is that? For example: Multi Unit Instanceable (MUI) spell is a spell which would function normally if it's cast while another instance of the same spell is running.)
    This trigger affect only melee units!
    This tutorial works with items level 1,2 and 3
    It is only example! Main trigger is above!


    • Item System
      • Events
        • Unit - A unit owned by Player 5 (Yellow) Acquires an item
      • Conditions
        • ((Hero manipulating item) is A melee attacker) Equal to True
      • Actions
        • Set Item = 0
        • -------- Setting value of Item from random to 0 --------
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • (Item level of (Item being manipulated)) Equal to 1
          • Then - Actions
            • For each (Integer Item_Slot) from 1 to 6, do (Actions)
              • Loop - Actions
                • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                  • If - Conditions
                    • (Item level of (Item carried by (Hero manipulating item) in slot Item_Slot)) Equal to 1
                  • Then - Actions
                    • Set Item = (Item + 1)
                    • -------- It will increase to 1 if hero have 1 item level 1, to 2 if hero have 2 items level 1... --------
                  • Else - Actions
            • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              • If - Conditions
                • Item Greater than 1
              • Then - Actions
                • Hero - Drop (Item being manipulated) from (Hero manipulating item)
                • Set LeakDestroy = Center of (Position of Circle of Power 0014 <gen>)
                • Item - Move (Last dropped item) to (LeakDestroy)
                • Custom script: call RemoveLocation(udg_LeakDestroy)
                • -------- You can see one new action: It will instantly move item to Circle of Power 0014! --------
                • -------- You can also see that I created another variable LeakDestroy (Variable Type: Point). Trigger can work without it but we need it because we want to destroy memory leak! --------
                • -------- What is memory leak, again I don't have time to explain what memory leak is because this tutorial want to teach you different thing --------
                • -------- But I can tell you that we clean (destroy) memory leaks only for one reason, we reduce lag, if you want to learn more, find tutorials about memory leaks on this site --------
                • Game - Display to (All enemies of (Owner of (Hero manipulating item))) for 10.00 seconds the text: Wanted to carry 2 F...
                • -------- It show enemy players for 10 seconds that Player who pick item wanted to carry 2 Flags at same time! --------
              • Else - Actions
          • Else - Actions
            • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              • If - Conditions
                • (Item level of (Item being manipulated)) Equal to 2
              • Then - Actions
                • For each (Integer Item_Slot) from 1 to 6, do (Actions)
                  • Loop - Actions
                    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                      • If - Conditions
                        • (Item level of (Item carried by (Hero manipulating item) in slot Item_Slot)) Equal to 2
                      • Then - Actions
                        • Set Item = (Item + 1)
                      • Else - Actions
                • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                  • If - Conditions
                    • Item Greater than 3
                  • Then - Actions
                    • Hero - Drop (Item being manipulated) from (Hero manipulating item)
                    • Game - Display to (Player group((Owner of (Hero manipulating item)))) for 10.00 seconds the text: Hero can carry only...
                    • -------- It show to player for 10 seconds that he can't pick more than 3 potion items! --------
                  • Else - Actions
              • Else - Actions
                • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                  • If - Conditions
                    • (Item level of (Item being manipulated)) Equal to 3
                  • Then - Actions
                    • For each (Integer Item_Slot) from 1 to 6, do (Actions)
                      • Loop - Actions
                        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                          • If - Conditions
                            • (Item level of (Item carried by (Hero manipulating item) in slot Item_Slot)) Equal to 3
                          • Then - Actions
                            • Set Item = (Item + 1)
                          • Else - Actions
                    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                      • If - Conditions
                        • Item Greater than 3
                      • Then - Actions
                        • Hero - Drop (Item being manipulated) from (Hero manipulating item)
                        • Game - Display to (Player group((Owner of (Hero manipulating item)))) for 10.00 seconds the text: Hero can carry only...
                        • -------- It show to player for 10 seconds that he can't pick more than 3 potion items! --------
                      • Else - Actions
                  • Else - Actions
                • -------- Trigger can go to oo --------


    Are you creating RPG map and you want to stack some more items into single one increasing it's charges!
    Check this trigger example then:

    • Events
      • Unit - A unit Acquires an item
    • Conditions
      • Or - Any (Conditions) are true
        • Conditions
          • (Item-type of (Item being manipulated)) Equal to Greater Potion of Healing
          • (Item-type of (Item being manipulated)) Equal to Greater Potion of Mana
          • (Item-type of (Item being manipulated)) Equal to Lesser Potion of Healing
          • (Item-type of (Item being manipulated)) Equal to Lesser Potion of Mana
          • (Item-type of (Item being manipulated)) Equal to Potion of Healing
          • (Item-type of (Item being manipulated)) Equal to Potion of Mana
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Hero manipulating item) has an item of type (Item-type of (Item being manipulated))) Equal to True
          • (Item being manipulated) Not equal to (Item carried by (Hero manipulating item) of type (Item-type of (Item being manipulated)))
        • Then - Actions
          • Item - Set charges remaining in (Item carried by (Hero manipulating item) of type (Item-type of (Item being manipulated))) to ((Charges remaining in (Item carried by (Hero manipulating item) of type (Item-type of (Item being manipulated)))) + (Charges remaining in (Item being manipulated)))
          • Hero - Drop (Item being manipulated) from (Hero manipulating item)
          • Item - Remove (Last dropped item)
        • Else - Actions


    Author's notes:

    This IDS is not perfect! You can find a lot better systems than mine (as well as a lot of worse ones! And I do mean A LOT!!!)
    If this tutorial helped you to understand how the IDS works (or at least gave you a glimpse of it), then my job here is done!

    If you want to learn more about Memory Leaks or Integer A check this tutorial

    THIS MESSAGE HAS BEEN SPOOFED FOR GRAMMAR AND ETHICAL ERRORS BY: The_Mirai
     

    Attached Files:

    Last edited: Jul 20, 2010
  2. Darkness-4ever

    Darkness-4ever

    Joined:
    Nov 4, 2007
    Messages:
    763
    Resources:
    0
    Resources:
    0
    Maybe you haven't heard, but recently the tutorial moderator had a tornado run right through his house, so he won't be approving anything anytime soon.
     
  3. -Kobas-

    -Kobas-

    Joined:
    Jan 17, 2010
    Messages:
    5,895
    Resources:
    28
    Icons:
    1
    Tools:
    2
    Maps:
    10
    Spells:
    4
    Template:
    5
    Tutorials:
    6
    Resources:
    28
    Moderators : 2
    Pyritie, hawk900

    Tornado?
     
  4. Maker

    Maker

    Joined:
    Mar 6, 2006
    Messages:
    9,181
    Resources:
    17
    Maps:
    2
    Spells:
    14
    Tutorials:
    1
    Resources:
    17
    *It's not MUI.
    *Lacks "Unit loses an item" trigger.
    *You should present the item caps in a better way. Use an initialization trigger.
     
  5. -Kobas-

    -Kobas-

    Joined:
    Jan 17, 2010
    Messages:
    5,895
    Resources:
    28
    Icons:
    1
    Tools:
    2
    Maps:
    10
    Spells:
    4
    Template:
    5
    Tutorials:
    6
    Resources:
    28
    I know what MUI is but ?
    I don't understand what you want to say?
    Item Caps in better way? Can you pls select text from above or write where I make mistake :cute:
     
    Last edited: Mar 30, 2010
  6. Maker

    Maker

    Joined:
    Mar 6, 2006
    Messages:
    9,181
    Resources:
    17
    Maps:
    2
    Spells:
    14
    Tutorials:
    1
    Resources:
    17
    Now that I look at it, it seems to be MUI afterall. Never mind that "loses and item" trigger. I misinterpreted the trigger at first.

    You could move that Items = 0 at the very beginning of actions, since it is set anyway, regardless of the item's level.

    It's not a mistake per se. It just would be easier to use variables for those item caps, and set them in an initialization trigger rather than using hard coded values inside the code.
     
  7. -Kobas-

    -Kobas-

    Joined:
    Jan 17, 2010
    Messages:
    5,895
    Resources:
    28
    Icons:
    1
    Tools:
    2
    Maps:
    10
    Spells:
    4
    Template:
    5
    Tutorials:
    6
    Resources:
    28
    Oh, I see what you want to say, oki it will be done! Thanks :thumbs_up:

    Maybe you are right, bit as I write above this tutorial was created to teach people something. I thinks that even dude who first time open WE can look at this and say: Wow I can do that!
    That is the point! I don't want to teach people like you, because you already knows this (Maybe in different way)

    P.S. if more people want from me to make it that way it shall be done :cute:
     
  8. Etzer

    Etzer

    Joined:
    Feb 18, 2009
    Messages:
    1,256
    Resources:
    0
    Resources:
    0
    Tornado?
     
  9. -Kobas-

    -Kobas-

    Joined:
    Jan 17, 2010
    Messages:
    5,895
    Resources:
    28
    Icons:
    1
    Tools:
    2
    Maps:
    10
    Spells:
    4
    Template:
    5
    Tutorials:
    6
    Resources:
    28
    That tornado :hohum:
    Crazy joke :eekani:

    Btw, I asked moderator to check tutorial and he say OK!
     
  10. Vakama_Lynx

    Vakama_Lynx

    Joined:
    May 8, 2009
    Messages:
    72
    Resources:
    1
    Template:
    1
    Resources:
    1
    Useful. lol better than that "you can only carry one item of this type" message that pops up and is so annoying
     
  11. Kwah

    Kwah

    Joined:
    May 9, 2007
    Messages:
    3,391
    Resources:
    8
    Icons:
    5
    Maps:
    1
    Tutorials:
    2
    Resources:
    8
    I've done a few things to a portion of the tutorial to demonstrate some of the ideas that I want you to address. I mostly left the colours and formatting you had, and the formatting overall was fine. However, the way you write isn't really good for a tutorial setting. Don't CnP what I wrote, obviously and feel free to keep your own spin on it. However, the edited (first bit) and commented (latter bit), portion that I've shown should cover most of the issues I have with the tutorial. Go through and fix these problems throughout the rest of the tutorial and bump the thread when you've done some work.

    Nonetheless, it's a good start, and one that does have potential.

    Fixed

    Item Drop System
    Requirments
    • A basic knowledge of the Object Editor
    • A basic knowledge of the Trigger Editor
    • Limited knowledge in variables.
    • A moment of your time ;)


    Introduction

    You may find yourself asking, what is an Item Drop System (IDS)? Let me explain:

    If you ever have played a map like Gaia's Retaliation you know that you are allowed to carry only 1 item of the same type (Weapon, Armor, etc.). Meaning, that if a player picks up an item of a type which was already in his inventory, it will be automatically dropped, and therefore player will be un-able to carry two items of this type simultaneously. It's simple as that! :)

    How does this system work?

    The system uses the level of items to create your own classes rather than being limited to using only the number of classes available in the game.

    Example

    The Bad

    Permanent --------- Weapon
    Campaign ---------- Armor
    Power Up ---------- Shield
    ...
    Purchasable -------- Rock


    The Good

    Level 1. ---------------- Weapon
    Level 2. --------------- Shield
    Level 3. ---------------- Potion
    Level 10. --------------- Boots
    Level 451. ------------- Thingamawatsits


    With the levels you can use an effectively infinite number of your own item classes, whereas with the old method, you are limited to just a few!


    Let's start!

    1. You must know that this trigger affects only one Class (Ofc we will use item level) so that people can learn how to actually make the IDS and not just copy-paste it. But still, at the end of this tutorial you will find system which I used in my map or an example of how it can look. So be patient and try to learn! :) Here is an example of the reader not really having a clue what you're talking about. The phrase "You must know that this trigger affects only one Class (Ofc we will use item level), isn't easily comprehensible. Really try to work on this, as obviously understanding is key to having a good tutorial.

    2. Ok, you can now open your map or create new one if you want to test the system first! The wording is fine, but it just looks un-professional. Having a casual tone of voice is fine, and often a great thing in a tutorial. You probably want something more like "Okay, now you can open your map up, and test the system out!".

    Subtle grammar can really help add to the polish.


    3. Create new trigger! (You pick the name for it :))

    4. Then just modify it like that one below (It will drop the second level 1 item if a player tries to acquire another level 1 item) Again, clarify.

    5. Change all item levels to 1,2..n for each class that you use or else this trigger will fail! More clarification!

    Hint: What will happen if you want to change item level to level 9,10...n,
    you can't! Why then I wrote you can make n item classes :)
    I will show you magic: Shift+One Left Mouse Click+Another One Left Mouse Click = OMG you can put there any number you want :) Here I'd try to phrase it more like "You'll find that you can't enter the number you want! I'll show you a little bit of magic. If you select Item Level, and while holding down Shift, hit Enter you'll be able to enter whatever number you want!

    You can use it for everything else from making negative mana and life regeneration to negative Hit points (omg who will use that). It's great that you mention this, but I pretty much refuse to accept a tutorial that uses the word omg in it. Keep it clean. ;)

    Btw here is the trigger! Btw has the same stamp of death as omg. Use full words plz. Also, you probably want to introduce what 'the trigger' is.
     
  12. -Kobas-

    -Kobas-

    Joined:
    Jan 17, 2010
    Messages:
    5,895
    Resources:
    28
    Icons:
    1
    Tools:
    2
    Maps:
    10
    Spells:
    4
    Template:
    5
    Tutorials:
    6
    Resources:
    28
    Thanks a lot man, I will soon edit tutorial and ask The_Mirai to check grammar again!
     
  13. Kwah

    Kwah

    Joined:
    May 9, 2007
    Messages:
    3,391
    Resources:
    8
    Icons:
    5
    Maps:
    1
    Tutorials:
    2
    Resources:
    8
    Approved, feel free to make more changes.
     
  14. Garfield1337

    Garfield1337

    Joined:
    Jul 6, 2009
    Messages:
    1,806
    Resources:
    4
    Maps:
    1
    Spells:
    3
    Resources:
    4
    To make it functional for every item class (If there is large amount of classes)
    you may use this:
    • Item System
      • Events
        • Unit - A unit Acquires an item
      • Conditions
      • Actions
        • Set Item = 0
        • For each (Integer Slot_Integer) from 1 to 6, do (Actions)
          • Loop - Actions
            • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              • If - Conditions
                • (Item level of (Item carried by (Hero manipulating item) in slot Slot_Integer)) Equal to (Item level of (Item being manipulated))
              • Then - Actions
                • Set Item = (Item + 1)
              • Else - Actions
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • Item Greater than 1
          • Then - Actions
            • Hero - Drop (Item being manipulated) from (Hero manipulating item)
            • Game - Display to (All players) for 5.00 seconds the text: Can't carry more th...
          • Else - Actions


    However,it will drop acquired item whenever you have 2 of it's type,no matter what level that item is.
     
  15. -Kobas-

    -Kobas-

    Joined:
    Jan 17, 2010
    Messages:
    5,895
    Resources:
    28
    Icons:
    1
    Tools:
    2
    Maps:
    10
    Spells:
    4
    Template:
    5
    Tutorials:
    6
    Resources:
    28
    Well if you use potions in your ORPG map, this trigger is fail, because you maybe want to stack them!

    Example
    • Events
      • Unit - A unit Acquires an item
    • Conditions
      • Or - Any (Conditions) are true
        • Conditions
          • (Item-type of (Item being manipulated)) Equal to Greater Potion of Healing
          • (Item-type of (Item being manipulated)) Equal to Greater Potion of Mana
          • (Item-type of (Item being manipulated)) Equal to Lesser Potion of Healing
          • (Item-type of (Item being manipulated)) Equal to Lesser Potion of Mana
          • (Item-type of (Item being manipulated)) Equal to Potion of Healing
          • (Item-type of (Item being manipulated)) Equal to Potion of Mana
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Hero manipulating item) has an item of type (Item-type of (Item being manipulated))) Equal to True
          • (Item being manipulated) Not equal to (Item carried by (Hero manipulating item) of type (Item-type of (Item being manipulated)))
        • Then - Actions
          • Item - Set charges remaining in (Item carried by (Hero manipulating item) of type (Item-type of (Item being manipulated))) to ((Charges remaining in (Item carried by (Hero manipulating item) of type (Item-type of (Item being manipulated)))) + (Charges remaining in (Item being manipulated)))
          • Hero - Drop (Item being manipulated) from (Hero manipulating item)
          • Item - Remove (Last dropped item)
        • Else - Actions


    Well after all it can be used for sure, there will be always some unique map, so your trigger can find some use :thumbs_up:
     
  16. Garfield1337

    Garfield1337

    Joined:
    Jul 6, 2009
    Messages:
    1,806
    Resources:
    4
    Maps:
    1
    Spells:
    3
    Resources:
    4
    You can put
    • (Item-class of (Item being manipulated)) Not equal to Charged


    In main trigger condition,or just list items that shouldn't be dropped there.
     
  17. Arisato

    Arisato

    Joined:
    Dec 17, 2009
    Messages:
    991
    Resources:
    7
    Models:
    1
    Maps:
    4
    Spells:
    1
    Tutorials:
    1
    Resources:
    7
    Perfect!

    But there "is" a more simplified way by just using booleans

    like if a unit takes an item, that boolean will be true, and if he take another item with the same level, and the trigger checks that if the boolean is true, it will pop out a game text message and drop the item ^_^!
    That way that is MUI, but this one is just perfect too, we have more advantage at doing this that and more:thumbs_up::thumbs_up::thumbs_up:
     
  18. -Kobas-

    -Kobas-

    Joined:
    Jan 17, 2010
    Messages:
    5,895
    Resources:
    28
    Icons:
    1
    Tools:
    2
    Maps:
    10
    Spells:
    4
    Template:
    5
    Tutorials:
    6
    Resources:
    28
    Well I told above already: example trigger isn't MUI because I wanted to show all what can be created! You can simple add different event and fix some actions or events and it will become MUI :razz:
     
  19. Bugbuster96

    Bugbuster96

    Joined:
    Aug 11, 2009
    Messages:
    152
    Resources:
    2
    Template:
    1
    Tutorials:
    1
    Resources:
    2
    Kobas i am sorry for wasting your time, you were right, I got confused of the items.
    btw i read all before I've commented. -.-
     
  20. -Kobas-

    -Kobas-

    Joined:
    Jan 17, 2010
    Messages:
    5,895
    Resources:
    28
    Icons:
    1
    Tools:
    2
    Maps:
    10
    Spells:
    4
    Template:
    5
    Tutorials:
    6
    Resources:
    28
    No problem dude, I asked you for that so people don't start bothering me about it! :thumbs_up: