• 🏆 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!

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