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

Item won't be consumed after use

Status
Not open for further replies.
Level 15
Joined
Aug 7, 2013
Messages
1,338
Hi,

Edit: Solved. The problem was I gave its item ability zero levels instead of 1, which caused a really strange effect. My trigger detected the item ability still, but I guess if you give an item ability 0 levels and put it on a consumable item, it makes it so the consumable item doesn't get consumed.

Curse Blizzard for starting level indexing at 1 and not 0...this has caused so many bugs and errors for me!


I made an item based off healing potion (pghe) but it's item ability is channel based. I've done this before and have had no problems. In fact I have a series of other items made the same way and they work fine.

The problem with this item is that it doesn't go away after using it, unlike a healing potion or whatever consumable item you have. My other items based on channel do work correctly (they are consumed after use). Why is this item not being consumed?
 
Level 15
Joined
Aug 7, 2013
Messages
1,338
It can't according to Blizzard's WC3 object editor.

But why wouldn't we start indexing at 0 instead of 1?

Starcraft 2 has heroes start at level 0, not level 1 AFAIK.
 
I guess a level of 0 when it comes to abilities (or heroes for that matter) just makes less sense for the average user. Me included.

I can see the idea of using 0 when fx. running an Integer loop. On the other hand, it does still make more sense to me to start with 1 than 0.
That's probably one of the differences between a map maker and a map coder.
 
Maybe use a trigger such when when the item is consumed create a new item of the same thing?

Edit: Solved. The problem was I gave its item ability zero levels instead of 1, which caused a really strange effect. My trigger detected the item ability still, but I guess if you give an item ability 0 levels and put it on a consumable item, it makes it so the consumable item doesn't get consumed.

The very first part ;)
 
Level 3
Joined
Jun 2, 2014
Messages
64
I had looked through the triggers and think that i have found a way that might work for you too o_O

Trigger2
Events
Unit - A unit Uses an item
Conditions
(Item-type of (Item carried by (Triggering unit) in slot 1)) Equal to Potion of Healing
Actions
Item - Set charges remaining in (Item carried by (Triggering unit) in slot 1) to 1
 
Status
Not open for further replies.
Top