Staredit Network

Staredit Network -> UMS Assistance -> Morale -- Deaths + Kills
Report, edit, etc...Posted by micro119 on 2005-09-11 at 00:06:54
- 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?
Report, edit, etc...Posted by DT_Battlekruser on 2005-09-11 at 01:02:01
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.
Report, edit, etc...Posted by micro119 on 2005-09-11 at 01:19:51
So what do you suggest?
Report, edit, etc...Posted by DT_Battlekruser on 2005-09-11 at 01:22:09
How many different units can die for the player? Isn't the enemy kills the same as the player deaths?
Report, edit, etc...Posted by Ultimo on 2005-09-11 at 01:22:37
*edit*
Report, edit, etc...Posted by micro119 on 2005-09-11 at 01:47:02
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)
Report, edit, etc...Posted by DT_Battlekruser on 2005-09-11 at 01:49:43
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 <_<
Report, edit, etc...Posted by micro119 on 2005-09-11 at 01:53:13
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*
Report, edit, etc...Posted by Oo.Jamal.oO on 2005-09-11 at 07:49:11
The only thing i could think of is instead of subtract 1, set to 0, other than that ur on ur own.
Report, edit, etc...Posted by Kumano on 2005-09-11 at 08:05:39
He did use set to 0..
Report, edit, etc...Posted by PCFredZ on 2005-09-11 at 09:09:58
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.
Report, edit, etc...Posted by micro119 on 2005-09-11 at 14:45:54
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
Report, edit, etc...Posted by DT_Battlekruser on 2005-09-11 at 14:46:07
Powerups can die? Minerals? There just aren't that many things that can die.
Report, edit, etc...Posted by micro119 on 2005-09-11 at 14:59:44
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?
Report, edit, etc...Posted by DT_Battlekruser on 2005-09-11 at 15:03:37
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);
Report, edit, etc...Posted by micro119 on 2005-09-11 at 15:39:00
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.
Report, edit, etc...Posted by DT_Battlekruser on 2005-09-11 at 15:41:02
If you have two triggers, don't subtract score in the second one.
Report, edit, etc...Posted by micro119 on 2005-09-11 at 15:42:05
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
Report, edit, etc...Posted by AFL-InuYasha on 2005-09-11 at 17:27:50
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
Report, edit, etc...Posted by Oo.Turin.oO on 2005-09-11 at 20:35:16
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
Report, edit, etc...Posted by PCFredZ on 2005-09-11 at 21:56:08
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.
Report, edit, etc...Posted by micro119 on 2005-09-11 at 22:02:19
No this is the only place i am using deaths
Next Page (1)