• 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.

Unique Items

Status
Not open for further replies.
Level 3
Joined
Feb 18, 2017
Messages
31
Hello guys,

does someone have an idea how to make items unique? By saying unique i mean that it is not possible to buy the same item twice.

Example: I have a potion that refills when visiting a certain point. If i jus put it in the shop i can buy it twice and have 6 seperat charges because using 1 charge from the first potion doesnt automatically use 1 charge from the second potion.

So i want to prevent that from happening and make some items unique so every player can only buy them once.

I tried with "Hero has item of type" but then i cant even buy the item at all.

If someone has an idea how i could solve this please tell me!
 
Level 3
Joined
Feb 18, 2017
Messages
31
Refillable Potion
Event
Unit - A unit Aquires an Item
Condition
Action
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
'IF'-Conditions
((Hero manipulating item) has an item of type |c00FFFF00Refillable Potion|r) Equal to True
((Hero manipulating item) has an item of type |c00FFFF00Refillable Potion|r) Equal to True
'THEN'-Actions
Item - Remove (Item carried by (Hero manipulating item) of type |c00FFFF00Refillable Potion|r)
'ELSE'-Actions



So i check if the hero has the item twice and then i remove one. Not this way?
 
Level 13
Joined
Jul 15, 2007
Messages
763
Your trigger will fire whenever a unit acquires an item (e.g. if it's holding a potion, then picks up a stick, it will drop the potion).

You need 2 conditions (one you already have):
  1. Hero manipulating item has an item of type (your item) equal to true
  2. Item type of item being manipulated equal to (your item)
 
Level 3
Joined
Feb 18, 2017
Messages
31
Okay but the event "unit aquires an item" will stay right?

And then i go with "item - remove ..."?
 
Status
Not open for further replies.
Top