• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

How to limit items?

Status
Not open for further replies.
Level 2
Joined
Oct 14, 2006
Messages
8
I want to make it so if ANY unit that gets more than 1 of "XXX item" then the 2nd item will be destroyed so there is only one on the carrier at all times
 
Level 19
Joined
Apr 25, 2006
Messages
1,309
pevs said:
I want to make it so if ANY unit that gets more than 1 of "XXX item" then the 2nd item will be destroyed so there is only one on the carrier at all times
I can't remember all the the action/condition names but something like this:
Event: A hero acquires an item
Actions: Maybe under hero or item section, do the actions so that it checks if the hero has a same type of item it picked, if it has, remove one of them. Use integer section in condition-The hero has more than 1 item of the type?

Tell me if you need more help.
 
Level 4
Joined
Jan 23, 2005
Messages
65
event: a unit aquire an item
action:
loop a for 1 to 6,
if item carried by (triggering unit/hero manipulating item) in slot a equal to (item being manipulated)
then remove (item being manipulated)
else (do nothing)

something like this ...
 
Level 4
Joined
Oct 23, 2006
Messages
65
Saiyuki said:
event: a unit aquire an item
action:
loop a for 1 to 6,
if item carried by (triggering unit/hero manipulating item) in slot a equal to (item being manipulated)
then remove (item being manipulated)
else (do nothing)

something like this ...

The slot the item is in will always be equal to itself... so he'd never be able to pick it up.
 
Status
Not open for further replies.
Top