What I want to do may be impossible to do but Ill try asking help for it:
I want that the ammo (minerals/gas) of a weapon is keep in the map memory. Say for example u got a Machine gun that have 4 ammos and 3 clips and you want to change to ur Handgun with 6 ammos and 10 clips. You both own these 2 weapons but each time u need to change weapon your ammos and clips (minerals and gas) will be saved for later use when u decide that u take back that weapon. Ive tried to use death counter but if i kill someone else unit with my player 1 unit 1 death get removed per kill because of the use ammo trigger with set to 0 kill action. So can anyone else help me with this?
well, how much ammo is the maximum?
this is just a possibility but for each ammo you got create a unit( lets say a medic) in a place on the map where no one can see and for clips create a unit (lets say a scv) and then once you say have like 4 ammo and 2 clips there will be 4 medics and 2 scvs somewhere u cant see owned by a computer. then once you have changed units and want to come back you will get 4 minerals for the 4 medics and 2 ore for the 2 scvs etc....
there will be 8 players in total (6 players and 2 comps) with 6 weapons possible to own for each of these 8 player, the biggest max will be 50 ammo and for clips 100 and ive tried to do units to keep tracks of em but will take too many locations for my map so I havent any clue yet maybe ill remove the ammo system if its impossible to do
If # of units isnt an issue, then instead of medic just use burrowed lings... alothugh u may max quite fast with that many men...
(hero = clip, non = ammo)
I don't understand what's your problem with the death counters to keep track of it, please explain it more clearly.
See what I was thinking was
2 different death counters for each weapon. One to track gas and one to track minerals for each weapon.
So that means you need 12 UNUSED units to serve as death counters. They must be unused units so they don't interfere with what happens during the game, like they won't be getting killed or anything.
Then you also have to keep track of what weapon the person has currently equipped.
So then whenever you switch weapons, just subtract the gas and minerals and add to the corresponding 2 death counters for that weapon. Then using the 2 death counters that save the gas/minerals for the weapon you want, you add them back to your gas/minerals.
Now since there are 6 human players you want to always be manipulating the gas/minerals and death counters for the currentplayer only, or else you will be messing with other players stuff as well.
just make it so that when you switch, it stores it in one deathcount. you need one for each gun. then you would just have a trigger that sets the clips. then a second one to do the ammo amount.
like this
| Trigger |
| Conditions: |
¤ Switch to Pistol is set
|
¤ Rifle is set
|
| ¤ Accumulates at least 1 mineral |
| Actions: |
¤ Subtract 1 Mineral
|
¤ Add 10 deaths for Rifle
|
| ¤ Preserve Trigger |
| Trigger |
| Conditions: |
¤ Switch to Pistol is set
|
¤ Rifle is set
|
| ¤ Accumulates at least 1 gas |
| Actions: |
¤ Subtract 1 gas
|
¤ Add 1 deaths for Rifle
|
| ¤ Preserve Trigger |
then you can do kind of the opposite of to get it back.
Ya, urmom's way is simpler. Just when you convert it back subtract as many clips as you can, then the rest is the ammo.
So like a clip holds 10 ammo, you have a trigger with like
Condition: currentplayer suffers at least 10 deaths of Rifle
Action: subtract 10 deaths of rifle, add 1 clip
Then another trigger which does the ammo
Condition: currentplayer suffers at least 1 death of rifle, currentplayer suffers at most 9 deaths of rifle
Action: subtract 1 death of rifle, add 1 ammo
Well I forgot to mention that I want weapons to reload and I think it is impossible to do reload part without interfering with ur triggers because whenever a weapon reach 0 ammo (minerals) it can reload when u have 1 clip (gas) avaialable at least
add in the suffered 0 deaths of the death counter you are using for that weapon in the conditions