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

Weapon/Ammo system ? Anyone ?

Status
Not open for further replies.
Level 15
Joined
Nov 26, 2005
Messages
1,151
Can anyone tell me where can I find a template or to help me make my own..
Basically what I need is a system that:
1. Can affect 1 Hero per player for 12 players
2. Uses item charges of a certain ammo type and sets them to (X-1) everytime the hero attacks
3. 'Empty Ammo item' Disappears
4. Can shoot really fast (like 0.15 cooldown)

Can you help me ... please ? Or direct me to a system of that kind ? (I did not find any on hive :?)
(Basically, I can't figure out how to make it work for 12 players ... something with the indexes maybe? Please .. help if u can.)
+rep for useful answers :)
 
Level 15
Joined
Aug 11, 2009
Messages
1,606
I didn't quite understood your first question.

About your second search here http://www.hiveworkshop.com/forums/spells.php?search=item stack&d=list&r=20 ,i am sure you will find out how to stack items(or ammos in your map).

About your 3rd question when item count is 0 it disappears so does ammos in your map...so you don't need to do anything.

4th question.Object editor?Edit attack cooldown?
 
Level 15
Joined
Nov 26, 2005
Messages
1,151
Well actually, what I need is a system like in REsident Evil maps, remember ? :)

But a quite simple one (I think), cause I need it for only one Hero per player, and no reload, no gold/lumber. Just an item named "Ammo1" which will give power to a Hero namerd "Herro with Weapon 1".

My problems are the variable indexes ... how can I make it useable by 8 heroes at the same time (each one for a different player)?

PS: I know how to make them shoot fast, I want the system to able to 'count' every shot even it is at a very quick rate. That is what I meant.
 
Level 10
Joined
Sep 21, 2007
Messages
517
you shoot

if ammo[playernumber of owner of triggering unit] == 0 then

do nothing

else

set some ammo[player number of owner of triggering unit] = ammo[playernumber of owner of triggering unit] - 1

-------------------------------- if you need it for diff units, use custom values, set each units custom value to a different one at beginning of map, and index the variables with the units custom value; this is assuming ur using GUI tho, you can also use hashtables, but this is easier.

gl happy mapping hf
 
Status
Not open for further replies.
Top