Hey I need some help with a set of triggers
I am trying to make it so player X get 1 gas per kill, but then I this one it count per hit and not kill :S
Defence is force1 human players
Trigger("Defence"){
Conditions:
Score("Current Player", Kills, At least, 1);
Actions:
Set Score("Current Player", Subtract, 1, Kills);
Set Resources("Current Player", Add, 1, gas);
Preserve Trigger();
}
//-----------------------------------------------------------------//
Trigger("Defence"){
Conditions:
Accumulate("Current Player", At least, 10, gas);
Actions:
Set Resources("Current Player", Add, 1, ore);
Set Resources("Current Player", Subtract, 10, gas);
Preserve Trigger();
}
None.
Try SET kills to zero. Subtract doesn't seem to work, its just there.
I know [that makes no sense!], its the only easy way to do it right now though.
None.
We can't explain the universe, just describe it; and we don't know whether our theories are true, we just know they're not wrong. >Harald Lesch
Subtract works. LOL
The problem is that when he kills a Zergling for example he gets 50 Kills Score
Then the trigger subtracts 1 score and gives 1 gas => score = 49, then subtracts another 1 score, adds 1 gas, etc. Until it is 0.
But your solution was correct. He has to SET it to 0 because a single kill gives a high amount of score which varies from unit to unit. Check the Wiki/tutorials if you want to know which unit gives how much score.
I don't know if you already realized, Asuka22dk, but your system has a big problem:
It can only handle one kill per trigger loop especially when not using hyper triggers or when using splash damage several of your kills will not be rewarded, because you SET it to 0, no matter what score.
Check the Wiki/tutorials if you need better kills to cash systems.
thanks I just hope some other then set as I think it count to slow even then I use hyper trigger
I also need some help with a round trigger
something like
counter down = 0 and switch "roundnumber" then spawn bla bla bla
if switch "all monster have been spawn" and player 7 has no unit at anyway set counterdown timer to 2min
But it wont work probly so right now only round 1 work and they dont spawn after that
None.
... Kills...);
Actions:
...Kills...
[quote=name:NudeRaider]...50 Kills Score...
Kills and Kill Score is different.
None.
Can easily be accomplished with the timer and a death counter.
Round 1:
Conditions:
Countdown timer is exactly 0 seconds
Computer player has suffered exactly 0 deaths of Independant command center
Actions:
Spawn men
Set to 1 for Independant Command Center for Computer Player
Round 2:
Enemies brings 0 men to location
COuntdown timer is exactly 0 seconds
Deaths 2 for Ind. COmmand center
Actions
Spawn
Set Timer
ect ect, get the point?
None.
... Kills...); Actions: ...Kills... [quote=name:NudeRaider]...50 Kills Score...
Kills and Kill Score is different.
Now look at the trigger
Score("Current Player", Kills, At least, 1);
Hehe. It is kill score.
Edit: sorry for double post
None.
We can't explain the universe, just describe it; and we don't know whether our theories are true, we just know they're not wrong. >Harald Lesch
... Kills...);
Actions:
...Kills...
[quote=name:NudeRaider]...50 Kills Score...
Kills and Kill Score is different.
Yes, but he always uses score, so what?
We can't explain the universe, just describe it; and we don't know whether our theories are true, we just know they're not wrong. >Harald Lesch
I'll clarify and correct a bit:
Can easily be accomplished with the timer and a death counter.
Round 1: (spawn)
Conditions:
Countdown timer is exactly 0 seconds
Computer player has suffered exactly 0 deaths of Independent command center (he uses a death counter instead of a switch to determine the round, which is more efficient)
Actions:
Spawn men
Set to 1 for Independent Command Center for Computer Player
prepare for next Round: (set timer)
Player 7 brings 0 men to location
Countdown timer is exactly 0 seconds
Actions
Set Timer
Round 2: (spawn)
Conditions:
Countdown timer is exactly 0 seconds
Computer player has suffered exactly 1 (not 2!) deaths of Independent command center
Actions:
Spawn men
Set to 2 for Independent Command Center for Computer Player
ect ect, get the point?
You might have noticed that order matters in this example. So you should have them owned by only one player because If the set timer trigger runs after the spawn triggers it wouldn't work. Also the timer trigger can be used for every round.
I must say death count is powerfull now I have learn how to use it both as a time and much more thnks nuderaider
Post has been edited 1 time(s), last time on May 11 2008, 11:51 pm by Asuka22dk.
None.
Yes, deaths are some of the most useful functions in SC, since they're basically the only way to declare a variable. If you want to see just about all the functions possible with them, check out this tutorial:
http://Falkoner.CoW.GooglePages.com/Death_Counts.html
None.
We can't explain the universe, just describe it; and we don't know whether our theories are true, we just know they're not wrong. >Harald Lesch
and much more thnks Nukeraider
O.o I will drop a Nude upon you if you call me that again!
lol, joking, you're welcome.