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

I need help creating a Ammunition system

Status
Not open for further replies.
Level 2
Joined
Sep 4, 2005
Messages
7
I still don't get how to create a ammo system. I tried experimenting with this trigger but it doesnt seem to work
Experiment(FAILED) Trigger
Event -
Unit - Unit is attacked
Condition
Action
Player - Set player 1 red current lumber -1

I knew i did somthing wrong with this experiment.. and now i need some info how to make this ammunition system successful in my map. Please help!
 
Level 3
Joined
Sep 15, 2005
Messages
26
I'm gonna post a version that you might be able to use. You'll have to use an 'ammo' integer variable, a paired 'ammo' real variable, and a seocnd model who can't attack. Please respond to this message as how your supposed to reload.

(This is for a specific player and his/her unit)
*Player Reds Ammo*
Events:
Unit - A unit Is attacked

Conditions:
(Unit-type of (Attacking unit)) Equal to [choose a unit]

Actions:
Set RedAmmo = (RedAmmo - 1)
For each (Integer RedAmmo) from 1 to 1, do (Set RedAmmoReal = (Real(RedAmmo)))

*Reds out of Ammo Trigger*
Events:
Game - RedAmmoReal becomes Equal to 0.00

Conditions:

Actions:
Unit - Replace [unit who attacks] with a [unit who doesnt attack] using The old unit's relative life and mana.

*Red Reloads* [You'll have to put in the Event and/or conditions casue I dotn know what your using to reload.]
Events:
Conditions:
Actions:
Set RedAmmo = 30[or whatever full is]
For each (Integer RedAmmo) from 1 to 1, do (Set RedAmmoReal = (Real(RedAmmo)))
Unit - Replace [unit who attacks] with a [unit who doesnt attack] using The old unit's relative life and mana.
 
Level 2
Joined
Sep 4, 2005
Messages
7
Insanebird said:
*Red Reloads* [You'll have to put in the Event and/or conditions casue I dotn know what your using to .
what do you mean by that? is it a animation i am going to use?
 
Level 1
Joined
Sep 14, 2005
Messages
9
Granny graham thinking that he means reload is the variable for the unit(invisible unit) You need to replace it once in a while or something like that of the such. But hey what do granny know......she getting old.......
 
Status
Not open for further replies.
Top