- Heres the deal, I am adding a morale system to my diplomacy map, and the deaths part is not working! the triggers are like this:
---------------------------------------------
---------------------------------------------
C: Score(CurrentPlayer, Kills, AtLeast, 1);
---------------------------------------------
A: SetScore(CurrentPlayer, SetTo, 0, Kills);
SetScore(CurrentPlayer, Add, 1, Custom);
PreserveTrigger();
Comment("Kills Morale");
---------------------------------------------
---------------------------------------------
C: Score(CurrentPlayer,Razings, AtLeast, 10);
---------------------------------------------
A: SetScore(CurrentPlayer, SetTo, 0,Razings);
SetScore(CurrentPlayer, Add, 1, Custom);
PreserveTrigger();
Comment("Kills Morale");
---------------------------------------------
---------------------------------------------
- Now those 2 seem to work because it deals directly with scores only, but its this one thats giving me trouble:
---------------------------------------------
---------------------------------------------
C: Deaths(CurrentPlayer, AtLeast, 1, AnyUnit);
---------------------------------------------
A: SetDeaths(CurrentPlayer, SetTo, 0, AnyUnit);
SetScore(CurrentPlayer, Subtract, 1, Custom);
PreserveTrigger();
Comment("Deaths Morale");
---------------------------------------------
---------------------------------------------
- The only part in this trigger that isn't working is the SetDeaths(CurrentPlayer, SetTo, 0, AnyUnit); because when I test it and I get 1 death it just keeps subtracting 1 over and over, can someone please help?
I'm not sure what setting deaths to 0 for AnyUnit does, but I don't think it sets deaths to 0 for all units under that player. I think deaths of AnyUnit is auto-fetched as the sum of the deaths.
How many different units can die for the player? Isn't the enemy kills the same as the player deaths?
Well its a Diplomacy, So thers up to 7 enemy players, and thers a huge amount of possible units that can die, from scv's to ghosts, to cannons, anything. Using the Kills of another player won't work, i don't think, cause there is 7 of them, and im trying to cut down on my triggers, also every kill someone gets its minused off ther kills (see above)
Here's my best suggestion:
Have a raw (undisplayed) kill amount, then take that and subtract the difference between you and the highest killer. Otherwise you'd have to do an action to set to 0 deaths of every unit which would be rather tiem consuming.
I might be missing something simple though <_<
Well that would be perfect if it was 1v1, but say im egypt, and im just sitting while germany and ussr are duking it out, my morale will go down, which is what i dont want
PS. me and suicidale are trying to figure something out, i wish there was a Loop option for actions, lol, *sigh*
The only thing i could think of is instead of subtract 1, set to 0, other than that ur on ur own.
QUOTE(DT_Battlekruser @ Sep 11 2005, 01:49 AM)
Otherwise you'd have to do an action to set to 0 deaths of every unit which would be rather tiem consuming.
[right][snapback]310697[/snapback][/right]
That could work too. There aren't THAT many units in SC, and any single map wouldn't used many of them.
Well my map uses the Spectrum of all units, protoss zerg and terran, i use almost every unit.
ADDITION:
but i geuss i could take the time..... but im still looking for the simple solution
Powerups can die? Minerals? There just aren't that many things that can die.
Well I am trying to cut down on triggers as is is, because my map is kinda full. But what your trying to say is:
| Trigger |
| Conditions: |
| ¤ Deaths(CurrentPlayer,AtLeast,1,Ghost); |
| Actions: |
¤ SetDeaths(CurrentPlayer,Setto,0,Ghost);
|
¤ SetScore(CurrentPlayer,Subtract,1,Custom);
|
| ¤ PreserveTrigger(); |
??
but won't that not work just like the AnyUnit one didn't work?
No, what I suggest is
¤ Deaths(CurrentPlayer,AtLeast,1,AnyUnit);
SetDeaths(Current Player, Setto, 0, Marine);
SetDeaths(Current Player, Setto, 0, Ghost);
SetDeaths(Current Player, Setto, 0, Firebat);
SetDeaths(Current Player, Setto, 0, Goliath);
SetDeaths(Current Player, Setto, 0, Wraith);
SetDeaths(Current Player, Setto, 0, Battlecruiser);
--- and so on ---
SetScore(Current Player, Subtract, 1, Custom);
Wow that might work, i'll try it, thats alot tho, even buildings lol
ADDITION:
Nope, didn't work, after 1 death of a unit, it just kept subtracting 2, because I have 83 usable units i had 2 triggers for it. It worked the same as the set deaths of anyunit to 0.
If you have two triggers, don't subtract score in the second one.
well thats not my problem, the problem is after one death it will subtract 1 then the trigger will fire over and over and keep subtracting, the setdeaths to 0 isn't working
having a collective trigger, or 2 in this case, wouldnt work anyway, wat if a player suffers 2 deaths of units in the same trigger, or 2 of the same, it would only subtract 1 if we could get this to work anyway, only thing i can think of is a death trigger for every unit, you could just use current player so only 83 trigs, not many once u get 1st 10 done, then its ez
What if you tried using Men instead of AnyUnit? It might work i dunno...i had this problem before but i forgot how i fixed it O.o
QUOTE(micro119 @ Sep 11 2005, 03:42 PM)
well thats not my problem, the problem is after one death it will subtract 1 then the trigger will fire over and over and keep subtracting, the setdeaths to 0 isn't working
[right][snapback]311270[/snapback][/right]
Is it possible that you're also using death counts for other purposes? That'd definitely cause a conflict.
No this is the only place i am using deaths