[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