I have a integer global varible (not array, not constant) called player8kill count
then
unit anyunit dies
conditions owner = triggering unit ==player 1
killing player ==8
ACTIONS
run trigger add gas player 8
variable setplayer8killcount = player8killcount
TRIGGER ADD GAS PLAYER 8
player8killcount >=10
modify player 8 vespene : add 1
variable set player 8 kill count = 0
atm when ever player 8 gets a kill after about twenty still nothing happens. Also when he kills a hero he gets 2 gas.
You ought to select your whole trigger and use the Copy As Text menu command so we can read it better. :P
So if player 8 kills one of player 1's units... I'm no longer sure what I'm reading after reading that part. You're running another trigger first, then you're setting a variable to exactly its current value and thereby not changing it? Or did you leave out an Arithmetic operation?
I think there's an automatically tracked kill count that you could use to determine if player 8 killed more than 10 enemies, anyway (although it'd be different if you wanted it on a per-player basis). You can check if that value modulo 10 is equal to 0, and that will have the same effect as resetting your variable to 0 after every 10 kills. (Modulo gives the remainder of division of the previous number by the following number, like 15 modulo 10 is 5.)
Alternatively, you might just be able to set the kill resource for each type of unit except heroes to 0.1, depending on your setup. I'm not totally certain how that would pan out: I'm not sure whether it would round or not in the display or internally, etc.
ADd gas player 8
Events
Local Variables
Conditions
player8killcount >= 10
Actions
Player - Modify player 8 Vespene: Add 1
Variable - Set player8killcount = 0
undead gets gas
Events
Unit - Any Unit dies
Local Variables
Conditions
(Owner of (Triggering unit)) == 1
(Killing player) == 8
Actions
Trigger - Run ADd gas player 8 (Check Conditions, Don't Wait until it finishes)
Variable - Set player8killcount = player8killcount
Give gas undead for leader kill
Events
Unit - Any Unit dies
Local Variables
Conditions
(Owner of (Triggering unit)) == 1
(Killing player) == 8
Actions
Trigger - Run ADd gas player 8 (Check Conditions, Don't Wait until it finishes)
Variable - Set player8killcount = player8killcount
I have a integer global varible (not array, not constant) called player8kill count then unit anyunit dies conditions owner = triggering unit ==player 1 killing player ==8 ACTIONS run trigger add gas player 8 variable setplayer8killcount = player8killcount
TRIGGER ADD GAS PLAYER 8 player8killcount >=10 modify player 8 vespene : add 1 variable set player 8 kill count = 0
atm when ever player 8 gets a kill after about twenty still nothing happens. Also when he kills a hero he gets 2 gas.
unit anyunit dies
triggering unit civilian male x7
modify player 8 vespene : add 2
what am i doing wrong? thanks in advance.
@CrazyTwigman: Go
You ought to select your whole trigger and use the Copy As Text menu command so we can read it better. :P
So if player 8 kills one of player 1's units... I'm no longer sure what I'm reading after reading that part. You're running another trigger first, then you're setting a variable to exactly its current value and thereby not changing it? Or did you leave out an Arithmetic operation?
I think there's an automatically tracked kill count that you could use to determine if player 8 killed more than 10 enemies, anyway (although it'd be different if you wanted it on a per-player basis). You can check if that value modulo 10 is equal to 0, and that will have the same effect as resetting your variable to 0 after every 10 kills. (Modulo gives the remainder of division of the previous number by the following number, like 15 modulo 10 is 5.)
Alternatively, you might just be able to set the kill resource for each type of unit except heroes to 0.1, depending on your setup. I'm not totally certain how that would pan out: I'm not sure whether it would round or not in the display or internally, etc.
ADd gas player 8 Events Local Variables Conditions player8killcount >= 10 Actions Player - Modify player 8 Vespene: Add 1 Variable - Set player8killcount = 0
undead gets gas Events Unit - Any Unit dies Local Variables Conditions (Owner of (Triggering unit)) == 1 (Killing player) == 8 Actions Trigger - Run ADd gas player 8 (Check Conditions, Don't Wait until it finishes) Variable - Set player8killcount = player8killcount
Give gas undead for leader kill Events Unit - Any Unit dies Local Variables Conditions (Owner of (Triggering unit)) == 1 (Killing player) == 8 Actions Trigger - Run ADd gas player 8 (Check Conditions, Don't Wait until it finishes) Variable - Set player8killcount = player8killcount
i cant find any kill bounty for civilian either, i can find it for marine not civilian