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.
[07:47 pm]
Ultraviolet -- Yeah, I suppose there's something to that
[2024-5-06. : 5:02 am]
Oh_Man -- whereas just "press X to get 50 health back" is pretty mindless
[2024-5-06. : 5:02 am]
Oh_Man -- because it adds anotherr level of player decision-making where u dont wanna walk too far away from the medic or u lose healing value
[2024-5-06. : 5:01 am]
Oh_Man -- initially I thought it was weird why is he still using the basic pre-EUD medic healing system, but it's actually genius
[2024-5-06. : 3:04 am]
Ultraviolet -- Vrael
Vrael shouted: I almost had a heart attack just thinking about calculating all the offsets it would take to do that kind of stuff
With the modern EUD editors, I don't think they're calculating nearly as many offsets as you might imagine. Still some fancy ass work that I'm sure took a ton of effort
[2024-5-06. : 12:51 am]
Oh_Man -- definitely EUD
[2024-5-05. : 9:35 pm]
Vrael -- I almost had a heart attack just thinking about calculating all the offsets it would take to do that kind of stuff
[2024-5-05. : 9:35 pm]
Vrael -- that is insane
[2024-5-05. : 9:35 pm]
Vrael -- damn is that all EUD effects?
[2024-5-04. : 10:53 pm]
Oh_Man -- https://youtu.be/MHOZptE-_-c are yall seeing this map? it's insane
Please log in to shout.


Members Online: RIVE, Roy