Quip about Equipments

Rare_Yeoman

Cool Member
Reaction score
1
I've often been frustrated with the fact that a hero can be simutaniously using three helmets, two shields, and a weapon. I'd like to make it so a hero can only hold one of each type of item. The item types would be: helmet, armor, gloves, boots, shield, one-handed weapon, two-handed weapon (this would have to negate the ability to hold a shield), and miscellaneous (you'd be able to hold any amount of misc. items). So, what needs to happen is if a hero is holding a certain type of item, they can't pick up another of that same type (except for misc. items); or, I'm not sure if this is possible, but it's be perfect if the item they are picking up is swapped with the one in their inventory. If someone could help/tell me how to do this it'd be very much appreciated.

of course, +rep and credits will be given

Thank you,
Rare_Yeoman
 

inevit4ble

Well-Known Member
Reaction score
38
The best method I find this to use item classifications as you can check whether the hero is already carrying an item of that class and either switch the items out or make the new item unable to be picked up.
Trigger:
  • 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 (Hero manipulating item) in slot (Integer A))) Equal to (Item-type of (Item being manipulated))
          • (Item carried by (Hero manipulating item) in slot (Integer A)) Not equal to (Item being manipulated)
        • Then - Actions
          • Hero - Drop the item from slot (Integer A) of (Hero manipulating item)
          • Quest - Display to (Player group((Owner of (Hero manipulating item)))) the Warning message: Sorry!
        • Else - Actions
 

Rare_Yeoman

Cool Member
Reaction score
1
I don't have any of the items created in my map yet, so I can't really test this yet, but it look like it'll work.

@polo2005 - it looks like the link you posted uses the same trigger that inevit4ble posted, so thanks to you both
I'll let you know how things work out once I get the chance to test it
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top