Staredit Network > Forums > SC1 UMS Mapmaking Assistance > Topic: kills to cash help
kills to cash help
This topic is locked. You can no longer write replies here.
Sep 15 2009, 12:43 pm
By: Drakiel  

Sep 15 2009, 12:43 pm Drakiel Post #1



I can't figure out why my "kills to cash" won't work!
I'm SURE it's the "Current player kills at least 1 men" trigger, but what alternative should I use?

Under CONDITION, I've tried:
Kill score is ___---- but that's for the number of "points" a unit is "worth".
Player Kills is ___ --- but for some reason I can't "subtract # of kills" - Modify score for player "subtract 1 kill" isn't working.

Help!
This is my trigger:

Trigger("Force 1"){
Conditions:
Kill("Current Player", "Men", At least, 1);
Actions:
Set Score("Current Player", Subtract, 1, Kills);
Set Resources("Current Player", Add, 1, ore);
Set Score("Current Player", Add, 1, Custom);
Preserve Trigger();



None.

Sep 15 2009, 1:49 pm CecilSunkure Post #2



"Player Kills is ___ --- but for some reason I can't "subtract # of kills" - Modify score for player "subtract 1 kill" isn't working."

Isn't going to help you, as there is no way of "automating" your triggers with that condition. That is a 1 time thing, you can't reset kills.

So what you should do, is have your triggers detect the score of "kills", and 1 trigger for each type of unit to be killed. This means you need to know the score that each unit killed awards. In the action, set the score to 0.

Make sure your triggers with units that have the MOST score awarded go up in the top of the trigger list, and the ones with the smallest score awarded near the bottom.

I wish I could give this in more detail, but I really have to go NOW ;o



None.

Sep 15 2009, 2:09 pm Drakiel Post #3



Hmm I could have sworn I've done it long ago to where EACH KILL gives you X reward.... and can be reset/preserved. hmm..



None.

Sep 15 2009, 4:50 pm Norm Post #4



You have 2 options.

First of all, the fool-proof, yet extremely annoying way to trigger:

Determine the maximum amount of each killable unit that a player can kill and set up triggers like this:

1. Current player kills at least 1 Unit Z
Set Resources: add 3 ore.

2. Current player kills at least 2 Unit Z
Set Resources: add 3 ore.

and on and on for each unit.


OR

you have the second option, which is more prone to errors, but a lot easier to handle trigger wise. First you have to look up the kill scores of each possible unit to kill. After than, make triggers that look like this:

1. Current player's kill score is at least 50
Set Resources: add 3 ore
Set Score: set to zero kills for current player
preserve trigger

Stack the triggers in the list with the highest killscore first, and the lowest killscore last on the list. This will allow for additional customization of your system if you ever want to get into more advanced kills/cash systems.



None.

Sep 15 2009, 4:56 pm Drakiel Post #5



Alrighty that should work well enough. Thanks Norm!



None.

Sep 15 2009, 4:56 pm rockz Post #6

ᴄʜᴇᴇsᴇ ɪᴛ!

http://www.staredit.net/wiki/Kills_To_Cash
you have 3 options:
Detect player score (imperfect, ie you kill 2 broodlings and it may think you killed a zergling)
Detect each new level of kill(theoretically perfect, but requires a trigger for each kill and you must know the limit of kills in map)
Detect who currently has the most kills (theoretically perfect, but requires a place to kill units, and is not instant.)

The best method is probably detecting player score, accompanied by deaths of foes. Avoid splash. Also really read the wiki, it's very helpful.



"Parliamentary inquiry, Mr. Chairman - do we have to call the Gentleman a gentleman if he's not one?"

Sep 15 2009, 4:57 pm Norm Post #7



That's true devourer, but don't forget that my second option gives the flexibility for you to manually insert special units that share killscores with other units. You can do this by combining both methods and doing the first one for any units that have a different reward than units of the same killscore, and adding an action that modifies the killscore for current player to zero.

And I guess, there's always the possibility to exclude units that would make your life difficult.



None.

Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[09:16 am]
NimoStar -- ever wanted to play melee in installation tileset? Now you can https://staredit.net/topic/18929/
[02:29 am]
Symmetry -- TFW you google a problem and find the answer in a post you made yourself
[01:46 am]
Oh_Man -- How can i change my name here to put [TFE] on the end will thr website let me
[06:02 pm]
Zoan -- of course it isn't full understanding. You could ask "is the mechanism by which this counterexample blows up the ONLY mechanism possible for an initial configuration to blow up?"
[05:48 pm]
Zoan -- ppl do it all the time in PDEs
[05:47 pm]
Zoan -- Heinermann
Heinermann shouted: it also didn't solve that problem but hey as long as the investors are pleased
Constructing a counterexample is answering the question: "Is Navier Stokes well posed?" in the negative
[05:44 pm]
NudeRaider -- I only heard about it, didn't any news article, so what did it do then?
[05:43 pm]
Heinermann -- it also didn't solve that problem but hey as long as the investors are pleased
[05:39 pm]
NudeRaider -- I have no idea tbh. All I know no human was ever able to solve it, but there's at least a few that beat portal ;)
[05:32 pm]
Zoan -- Navier Stokes is not that esoteric I thought
Please log in to shout.


Members Online: Zoan