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

[Trigger] Item Ammo for Weapon

Status
Not open for further replies.
Level 5
Joined
Jun 29, 2008
Messages
54
ok i need a trigger that will allow my heros to reload theyre weapons with item ammo clips
Hero fires a weapon (machinegun with 30 ammunition). then ammo is emty. left click on 'ammo clip item' ammunition will get reloaded. every attack will decrease the number of machinegun items. the ammo should just reload the machine gun item. hope anyone could undersand my poor english
 
Level 8
Joined
Dec 16, 2007
Messages
252
There's plenty of systems.

But well you can do something like this

When a unit got a item, also give him an ability, raise it to lvl 30. Everytime he attack, decrease the level. When it reaches 0, order him to stop everytime he issue order for target. Then when he cast the ability reload, set the lvl back to 30.
 
Level 5
Joined
Jun 29, 2008
Messages
54
finaly i made an ammo system for my map but its a little bit buggy. if you click on a weapon your hero will be changed to a unit (Hero (Assault Rifle) for example) and if you attack the number of charges decrease by 1 each attack. if your weapon is emty and you click on it it will be realoded (if you have the fitting ammo for it)
-If you equip a weapon and theres a weapon already in your inventory (with 0 charges (EMTY)) you cant equip this weapon and you cant reload it. in fact its worthless.
 
Last edited:
Level 11
Joined
May 31, 2008
Messages
698
try using mana. If a unit attacks take away 1 mana and dont allow it to attack if it has no mana left. |A unit attacks. Mana > 0. Set attacking units mana to (Attacking units mana - 1).| |A unit attacks. Mana equal to 0. Order attacking unit to stop.| Just make the ammo clips mana vials so you pick it up then use it and gain mana back. Or
|A unit acquires item. Item is Ammo clip. Set triggering units mana to 30.| Hope this was helpful

EDIT: Maybe im too late and this problem is solved (i read posts after i posted this). Oh well :p
 
Status
Not open for further replies.
Top