• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Item Charge Condition - Trig Help

Status
Not open for further replies.
Level 3
Joined
Jun 5, 2004
Messages
37
I'm working on a map that uses an item based ammunition system, it's all been fine and well up until the point that the unit "runs out of" ammunition. The game automatically sets all items with a charge of "0" to endless charges instead of getting rid of it as would happen if you were to use a normal charged item in game.

Does anyone know how to get around this? I've looked and I can't seem to find much. There aren't any conditions in which an item can equal zero, I'm not excellent with JASS, so keeping it in standard form would be ideal, but I would take JASS over nothing.

Help is appreciated, thanks.
 
Level 7
Joined
Jul 30, 2004
Messages
451
nctltsf1 said:
I'm working on a map that uses an item based ammunition system, it's all been fine and well up until the point that the unit "runs out of" ammunition. The game automatically sets all items with a charge of "0" to endless charges instead of getting rid of it as would happen if you were to use a normal charged item in game.

Does anyone know how to get around this? I've looked and I can't seem to find much. There aren't any conditions in which an item can equal zero, I'm not excellent with JASS, so keeping it in standard form would be ideal, but I would take JASS over nothing.

Help is appreciated, thanks.

i've already done something like this with stackable things, its just an integer check (item - number of charges)

theres also the possibility that u can just check 'perishable' in the item editor, making it so once it gets to 0 charges it disappears instead of going infinite... although if it was like mine u can't and then u have to trigger it using the above mentioned check

if u need more explanation on how to actually go about doing it msg again
 
Level 3
Joined
Jun 5, 2004
Messages
37
Yes, I managed to be resourceful enough to check to see if I could do it via integars about 20 minutes after I posted that. Thanks for the additional help, and no, checking perishable will not solve anything.
 
Status
Not open for further replies.
Top