• Check out the results of the Techtree Contest #19!
  • 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.
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!

[Help] Remove one item from Hero

Status
Not open for further replies.
Level 2
Joined
Sep 11, 2009
Messages
11
Remove one item from Hero

How to remove an object of hero?

Example: I have 50 ammunition, through a trigger remove 1, 49 left... Remove other, 48 left... etc.

Thanks...

PD: Sorry for my English :P
 
Last edited:
You need a charged item. assume the maximum ammunition is 50, set its maximum charge through object editor to 50. After that, manipulate(add or subtract) the charge value through triggers. After the charge is depleted, remove the item from the hero.
 
Yes, as I am saying, each item is a cartridge. When a charge of an item becomes 0, the item is removed. Same as the concept on cartridges, when the cartridge becomes empty of bullets, the cartridge is removed from that hero.

Remember these:
Item = Cartridge
Item charge = Number of bullets
 
Create a new custom item. Then checked its classification as 'charged' and set its maximum charges based on the number of bullets each cartridge. Your new custom item will stands for the cartridge itself. As for the charge subtraction. Create a trigger like this:
  • Cartridge
    • Events
      • Unit - A unit is attacked
    • Conditions
      • (Attacking unit) has (item of type of (Cartridge)) Equal to True
    • Actions
      • //Your actions here: bullet reduction, etc.
 
Status
Not open for further replies.
Back
Top