Deaths 4 Cash
Oct 17 2007, 3:43 pm
By: ION  

Oct 17 2007, 3:43 pm ION Post #1



For every 100 any unit deaths, add 50 ore for player.
I tried this using the Kills 4 Cash method, not working for me. How can I setup a trigger that when 100 of any unit dies, they recieve 50 ore and then will loop.
I can get it to work but not loop. I also setup a neutral comp player that counts deaths but with no luck.

Conditions:
Neutral Plyr
Actions:
Always
Modify death counts for Neutral, Set to 100 for (Unit Im Using)

Conditions:
Player1 has suffered exactly 1 deaths of [any unit]
Actions:
Modify resources for Player1, add 50 ore
Display for current player, $50
Modify death counts for neutral, set to 100 for (Unit Im Using)
Preserve Trigger.

Tried a bunch of stuff, idk what trigger I should be making, does it need a switch? ty!



None.

Oct 17 2007, 4:09 pm AntiSleep Post #2



at least 100 deaths as condition

subtract 100 deaths as action



None.

Oct 17 2007, 4:29 pm ION Post #3



??? Protoss Carrier = DeathCounter, Neutral Unit. Somethings not right...

Trigger("Player 12"){
Conditions:
Always();

Actions:
Set Deaths("Player 12", "Protoss Carrier", Add, 100);
}

//-----------------------------------------------------------------//

Trigger("Player 12"){
Conditions:
Deaths("Player 1", "Any unit", At least, 100);

Actions:
Set Resources("Player 1", Add, 50, ore);
Display Text Message(Always Display, "\x003$50\x003");
Set Deaths("Player 12", "Protoss Carrier", Subtract, 100);
Preserve Trigger();
}

//-----------------------------------------------------------------//



None.

Oct 17 2007, 4:40 pm Oyen Post #4



I dont recall if "any unit" deaths can be subtracted. If they can, simply do this trigger:

Player: W/e
Conditions:
-Current Player has suffered at least 100 deaths of Any Unit.
Actions:
-Set Deaths: Subtract 100 Deaths of [Any Unit] for Current Player
-Modify Resources: Add 50 ore for current player
-Preserve Trigger



None.

Oct 17 2007, 4:43 pm ION Post #5



The trigger I have above works, but once it is set off, it keeps giving you $50 ore over and over.



None.

Oct 17 2007, 4:49 pm Oyen Post #6



The game counts Deaths on its own. You don't have to make a trigger to set the deaths to 100. The reason your trigger keeps repeating itself, is because the condition continues to be met by player 1 . Subtracting kills for player 12 doesnt change that. In the 2nd trigger, Either add a condition that says player 12 needs to have 100 deaths, or add an action that reduces player 1's deaths by 100.

EDIT: I don't think the game can subtract [ANY UNIT] deaths, You may need more than 1 trigger to accomplish what you're trying to do.

Post has been edited 2 time(s), last time on Oct 17 2007, 4:58 pm by Oyen.



None.

Oct 17 2007, 4:52 pm ION Post #7



So I don't need a neutral unit that keeps track of death counts? I read a tut that said I did, maybe for some other kind of setup.
Ok ty, I'll keep trying.



None.

Oct 17 2007, 5:06 pm ION Post #8



I have this trigger for kills, could I setup a trigger like this but for deaths, that loops?

Trigger("Player 1"){
Conditions:
Score("Player 1", Kills, At least, 70000);
Switch("Switch1", not set);

Actions:
Set Switch("Switch1", set);
Set Resources("Player 1", Add, 150, ore);
Display Text Message(Always Display, "\x007$150\x007");
Preserve Trigger();
}

//-----------------------------------------------------------------//

Trigger("Player 1"){
Conditions:
Score("Player 1", Kills, At least, 140000);
Switch("Switch1", set);

Actions:
Set Switch("Switch1", clear);
Create Unit("Player 1", "Zerg Overlord", 1, "*BLUE ZONE SPAWNER");
Set Score("Player 1", Subtract, 175000, Kills);
Set Resources("Player 1", Add, 200, ore);
Display Text Message(Always Display, "\x007$200\x007/\x002OverLord TelePorted\x002");
Preserve Trigger();
}

//-----------------------------------------------------------------//



None.

Oct 17 2007, 5:15 pm Oyen Post #9



No, that kill score idea wouldnt work for deaths if there are more than 2 players, since each person's kill score is modified by the killing of units owned by all players.

Maybe if you tell more details about your map and how it works, we can figure out a solution.



None.

Oct 17 2007, 5:21 pm ION Post #10



Some what like a zone control map, start with a sunken colony that produces 1hydra 1marine, preserve trig.
The trigger above is for kills, 200-400 give ore etc. at 400 u get an overlord you can use to buy heros/minerals/zones.
But if your not doing so well, I wanted a setup where after so many deaths of your hydra/marines you get minerals.
I just tried this,

Trigger("Player 1"){
Conditions:
Deaths("Current Player", "Any unit", At least, 50);
Switch("Switch10", not set);

Actions:
Set Switch("Switch10", set);
Set Resources("Current Player", Add, 50, ore);
Display Text Message(Always Display, "\x003$50\x003");
Preserve Trigger();
}

//-----------------------------------------------------------------//

Trigger("Player 1"){
Conditions:
Deaths("Current Player", "Any unit", At least, 100);
Switch("Switch10", set);

Actions:
Set Switch("Switch10", clear);
Set Deaths("Current Player", "Any unit", Set To, 150);
Set Resources("Current Player", Add, 50, ore);
Display Text Message(Always Display, "\x003$50\x003");
Preserve Trigger();
}

//-----------------------------------------------------------------//

EDIT:

After the 2nd trigger keeps giving you $.

So I have to keep track of each players deaths correct? Need to use a DeathCounter?..



None.

Oct 17 2007, 5:24 pm Oyen Post #11



I had an idea that might work. But it takes alot more than 2 triggers.
1. Make a trigger like this.

Player: w/e
Conditions:
-Current player has suffered at least 1 deaths of Terran Marine
Actions:
-Subtract 1 death of Terran Marine for Current Player
-Add 1 death of Flag for Current Player.
-Preserve Trigger

Replace marine with a unit that will be dieing. Then simply copy the trigger and modify each trigger to include each unit that can possibly die for a player. Those triggers wil convert regular unit deaths to flag deaths. Afterward, make this trigger:

Players: same as above
Conditions:
-Current Player has suffered at least 100 deaths of Flag.
Actions:
-Subtract 100 deaths of Flag for Current Player
-Add 50 Ore
-Preserve Trigger

Since the flag deaths is the total of deaths of all included units, then this should give you 50 ore after every 100 deaths.



None.

Oct 17 2007, 5:28 pm ION Post #12



Interesting.
I do have a bunch of heroes you can buy, so I need a trig for each hero?
And do flags have to be in the map, or is the flag basically not relevant. I dont need a physical flag in the map.

EDIT:

I already have flags in the map, I have them setup for the mass attack, so u know what base is which etc etc. But do I need to rename them or anything special?



None.

Oct 17 2007, 5:29 pm Oyen Post #13



You dont need flags in map. And yes, you do have to make a trig for each hero IF you want them included in the death count.

EDIT: it doesnt matter if you have flags in map or not. Since flags can't die, they won't affect the trigger.
EDIT: There is no need to rename the flags. Unless you specifically have a trigger that kills those flags, they won't cause problems.



None.

Oct 17 2007, 6:13 pm elysium.kliu Post #14



I don't know if you tried subtracting deaths of any unit because that would make it a whole lot easier. If it doesn't work, Oyen's method should work.



None.

Oct 17 2007, 6:19 pm ION Post #15



Yeah I've been testing it out and so far so good. TY I'll remember to try this with anything else I could use it for!



None.

Oct 17 2007, 6:51 pm NudeRaider Post #16

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

Quote from ION
So I don't need a neutral unit that keeps track of death counts? I read a tut that said I did, maybe for some other kind of setup.
Ok ty, I'll keep trying.
Lol. You got the whole idea of a death counter (dc) wrong I think...
As Oyen stated the game counts every death itself. When you lose a Marine the game adds 1 to the dc "marine" for current player (you).
-> That happens WITHOUT any custom triggers
Now you can make a condition that checks your deaths of either "marine" or "any unit" (sum of all units that died - any type)

When you want to give cash for losing a unit you must manually subtract the deaths again or the 'at least 1 marine' condition would never be false again, resulting in always giving money.
When you don't know which type of unit died you can subtract [any unit]. I'm sorry I can't tell you for sure how subtracting any unit works. But my guess is it just subtracts x deaths of EVERY type. Meaning when you checked if 1 marine died but you also lost 5 hyds the hyds counter is also subtracted by 1. If you need to know, make a testmap where you make a display action when a dc has a certain value.
-> This MODIFIES 'real' deaths occurred in the game.

-> But when a tut speaks of a NEUTRAL UNIT used as a DC its something else:
The idea is, to abuse the system described above and use dcs as variables instead. Sadly sc triggers don't support variables directly that's why we have to use this trick to store values.
But the idea IS NOT to simulate the real deaths with a neutral player. The tut meant to take a unit of the neutral (not terran/protoss/zerg) section and rename it. Because some of those cant be used ingame thus making sure your dc isnt modified by the ingame mechanics.
E.g. in an rpg you use a dc to store the players' lives. Now player buys a marine (mercenary) which dies -> you had the marine dc storing the lives -> player gets a life subtracted -> Thats why take unused units from the neutral section.
Neutral in this case has nothing to do with the owner of the unit but with the unit section where you can find it in the editor.

OK, so far the general explanation. Now to your problem:

The triggers oyen posted are fine. But as the "flag deaths" as he called it dont take units that are present on the map. Since flags CAN die, but only by triggers (kill all flags, etc.). However its safer to take for example neutral - neutral - cantina and rename it to "money counter" or something.

But I wonder... do you really want to give players cash if they LOSE units?
Or should they get the money for units their ENEMY has lost? Because the latter would work different since you can't always use current player.




Oct 17 2007, 6:57 pm NudeRaider Post #17

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

Quote from elysium.kliu
I don't know if you tried subtracting deaths of any unit because that would make it a whole lot easier. If it doesn't work, Oyen's method should work.
Right, but also a lot more imprecise. He said he has many different units on his map. So when he lost a marine and a hydralisk he subtracts BOTH units when subtracting any unit but adds only 1 to the counter.
With hypertriggers the precision would improve, but still fail when more than 1 type of unit dies the same time due to splash.

Oh and ION, when more than 1 unit dies per trigger loop the trigger couldn't keep up with the deaths.
So make a few copies of the triggers that subtract lets say 5 - 10 - 50 deaths (and add it to the counter).
Or use hypertriggers. This should be fast enough for every single killer unit.




Oct 17 2007, 11:40 pm who Post #18



use triggers that go up like binary counts, it's the most efficient way w/out hypers
e.g.
1 trig for at least 1 death to subtract 1 death
1 trig for at least 2 deaths to subtract 2 deaths
1 trig for at least 4 deaths to subtract 4 deaths
1 trig for at least 8 deaths to subtract 8 deaths

and so on... this way the minerals will come as quickly as possible without hypertriggers. make sure you also add minerals for those trigs.

by the way....
Quote

//-----------------------------------------------------------------//

Trigger("Player 1"){
Conditions:
Deaths("Current Player", "Any unit", At least, 100);
Switch("Switch10", set);

Actions:
Set Switch("Switch10", clear);
Set Deaths("Current Player", "Any unit", Set To, 150);
Set Resources("Current Player", Add, 50, ore);
Display Text Message(Always Display, "\x003$50\x003");
Preserve Trigger();
}

//-----------------------------------------------------------------//
why do you set deaths to 150 when the condition is at least 100 deaths? wouldn't that make it continually refire? you have to subtract deaths...
and the switch won't make a difference, because the trigger that sets the switch has a condition of at least 50 kills.



None.

Oct 18 2007, 3:50 am NudeRaider Post #19

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

Quote from someone09
use triggers that go up like binary counts, it's the most efficient way w/out hypers
e.g.
1 trig for at least 1 death to subtract 1 death
1 trig for at least 2 deaths to subtract 2 deaths
1 trig for at least 4 deaths to subtract 4 deaths
1 trig for at least 8 deaths to subtract 8 deaths

and so on... this way the minerals will come as quickly as possible without hypertriggers. make sure you also add minerals for those trigs.
Hm, agreed, you need a little more triggers for the same maximum number of deaths processed per trigger loop but you make sure every single death so far is subtracted. My method would lag behind a few kills every loop. (But be subtracted later)
I tend to use the values in my above post but I guess thats a question of taste.

Btw. your order is wrong. You need to place highest values first to have it work correctly.




Oct 31 2007, 1:13 am Elward Post #20



Player 1 (Any player or force) kills at least 100 any unit
Player 6 (whoever owns the massive force) suffers at least 100 deaths of any unit

Set deaths for Player 6: Subtract 100 deaths of any unit
Set resources for Player 1: Add 50 ore
Preserve.

I prefer this method.



None.

Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[10:53 pm]
Oh_Man -- https://youtu.be/MHOZptE-_-c are yall seeing this map? it's insane
[2024-5-04. : 1:05 am]
Vrael -- I won't stand for people going around saying things like im not a total madman
[2024-5-04. : 1:05 am]
Vrael -- that's better
[2024-5-04. : 12:39 am]
NudeRaider -- can confirm, Vrael is a total madman
[2024-5-03. : 10:18 pm]
Vrael -- who says I'm not a total madman?
[2024-5-03. : 2:26 pm]
UndeadStar -- Vrael, since the ad messages get removed, you look like a total madman for someone that come late
[2024-5-02. : 1:19 pm]
Vrael -- IM GONNA MANUFACTURE SOME SPORTBALL EQUIPMENT WHERE THE SUN DONT SHINE BOY
[2024-5-02. : 1:35 am]
Ultraviolet -- Vrael
Vrael shouted: NEED SOME SPORTBALL> WE GOT YOUR SPORTBALL EQUIPMENT MANUFACTURING
Gonna put deez sportballs in your mouth
[2024-5-01. : 1:24 pm]
Vrael -- NEED SOME SPORTBALL> WE GOT YOUR SPORTBALL EQUIPMENT MANUFACTURING
[2024-4-30. : 5:08 pm]
Oh_Man -- https://youtu.be/lGxUOgfmUCQ
Please log in to shout.


Members Online: Wing Zero