One of Each Item

L

LedZepplin

Guest
Just wondering how to make Heroes be able to have only one of each Item type in their inventory? An example being that a Hero can only hold one weapon and one set of gloves.
 

Yoshii

New Member
Reaction score
74
LedZepplin said:
Just wondering how to make Heroes be able to have only one of each Item type in their inventory? An example being that a Hero can only hold one weapon and one set of gloves.
event:a unit acquire item
conditon:item type of= your item
action:for each intergerA between 1 and 6; if hero carried item in slot A=your item; then item remove
 
L

LedZepplin

Guest
Could you explain please in greater detail, i do not understand or im doing something wrong.
 
T

Tieme

Guest
Okay

Okay I'm pretty new to the world editor but this is what I would do:
Create an ability that does nothing called armor
Give the item that ability
When you pick up an item check if it has an ability such as armor, helmet, weapon etc and if it does check your inventory for an item with same ability. If you do, drop the item you just picked up (or the one you have, your choice). I'm not sure if that 'armor ability' would make the ability show up on your char or not, if it works great if not I guess we will have to wait for more experienced users to reply as I would like to know about this too).



EDIT: Okay I tried it out, it works as far as the item goes, and I'm pretty sure it would be easy to make a trigger to check the item but I'm not sure, but at least we know you can make the item with an ability that labels it. Good luck!
 
L

LedZepplin

Guest
Ok thanks i will give it a shot.

EDIT: I tried it out and there is not anything to check to see if an item has an ability.
 
T

Tieme

Guest
Hrmmph

Yeah I can't find anything either I'll keep looking let me know if you figure something out I would like to know too. Thanks
 

Jazradel

Helping people do more by doing less.
Reaction score
102
There is no way to be able to get the ability a item has. Your suggest has given me a very good idea for doing this with HandleVars though.

To do to it with the GUI you would probably have to put every item of a type into an array then make the unit drop the item if it has another item in the array.
 
C

Cepheids

Guest
if item levels dont matter to you, you can use the item level to determine type.

ie

1 - armour
2 - weapon
3 - foot wear
4 - head wear
5 - shield
6 - accessory

i am sure u can check item levels. i think theres also a custom value for items. yea, use that too.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top