Staredit Network

Staredit Network -> UMS Assistance -> Another boring kill=cash problem.
Report, edit, etc...Posted by Saox on 2005-02-14 at 03:02:19
QUOTE
RESOURCES FOR KILLS

The question: Is it possible to have a player receive a specific amount of minerals/gas for each specific kill he or she gets? The answer: Yes, of course. Frankly, the reason why so many people don't seem to know this simple method yet eclipses me. The very fact is: everyone knows that you have a specific calculation of the "points" you get from each kill with the Kills Score. Yet, everyone seems to forget about that, and goes through all these strange methods involving hundreds of redundant unit-to-unit triggers that don't even work in all cases. Why? I dunno. But here is the easy way to do it:

The idea is to utilize the Kills Score (what we all know and love =) and transfer it directly to the minerals/gas "score." Here is the base trigger:

Owner:
- Player 1
Conditions:
- Current player Kills score is at least 1.
Actions:
- Modify score for Current player: Subtract 1 Kills.
- Modify resources for Current player: Add 1 Ore.
- Preserve trigger.

That little trigger will do the trick. It's rather elementary: for every 1 Kill point, the player will get 1 mineral. Because it is continuous (preserved), it will keep doing this until all the Kill points are turned into minerals. Simple as that. However, while this single trigger will function correctly and without exception, it will work very, very slowly since Starcraft only checks triggers every 2 seconds. That means it will transfer 1000 Kill points into 1000 minerals, but at the rate of 1 mineral every 2 seconds. Probably not what you desired.

But, expanding this simple trigger idea just a little and we can make the transfer occur in no time. First, instead of the trigger above, make the following:

Owner:
- Player 1
Conditions:
- Current player Kills score is exactly 1.
Actions:
- Modify score for Current player: Subtract 1 Kills.
- Modify resources for Current player: Add 1 Ore.
- Preserve trigger.

Then make:

Owner:
- Player 1
Conditions:
- Current player Kills score is at least 2.
- Current player Kills score is at most 3.
Actions:
- Modify score for Current player: Subtract 2 Kills.
- Modify resources for Current player: Add 2 Ore.
- Preserve trigger.

Now, follow this pattern…

Owner:
- Player 1
Conditions:
- Current player Kills score is at least X.
- Current player Kills score is at most Y.
Actions:
- Modify score for Current player: Subtract X Kills.
- Modify resources for Current player: Add X Ore.
- Preserve trigger.

… for X-Y combinations of 4-7, 8-15, 16-31, 32-63, 64-127, 128-255, 256-511, and 512-1023. And lastly make this trigger:

Owner:
- Player 1
Conditions:
- Current player Kills score is at least 1024.
Actions:
- Modify score for Current player: Subtract 1024 Kills.
- Modify resources for Current player: Add 1024 Ore.
- Preserve trigger.

This is a grand total of 11 triggers -- and that's all you'll need. If you don't already see where these triggers are going, let me explain. They are all essentially the same as the base trigger at the top, but split up the job of transferring the Kill points to minerals. For example, let's say a player has 1987 Kill points at one instant. Then:

First, the 1024 trigger initiates, subtracting 1024 Kills and leaving 963.
Now, the 512-1023 trigger initiates, subtracting 512 and leaving 451.
Next, the 256-551 trigger initiates, subtracting 256 and leaving 195.
Then, the 128-255 trigger initiates, subtracting 128 and leaving 67.
Now, the 64-127 trigger initiates, subtracting 64 and leaving 3.
Next, the 2-3 trigger initiates, subtracting 2 and leaving 1.
Finally, the 1 trigger initiates and transfers the last 1.
Because they are all separate triggers, they can all initiate at the same time, and thus our 1987 Kill points are turned into 1987 minerals instantly. (It may be proper to make the triggers backwards -- starting with 1024 and working your way to 1 -- since Starcraft likes to check triggers in order and you want the "larger" ones to initiate first) This system is elegantly simple, and yet, very effective.

Now that you understand what is going on, you may be asking, "But what if the player has more than 1024 Kill points -- like 50,000? Won't the 1024 trigger have to initiate more than once?" Well, yes, it does. However, there are two major reasons why you don't need to make triggers for scores above 1024. First of all, it is very unlikely that a player will accumulate something like 50,000 points in two seconds (the time between trigger checks and activation). Second, the mineral count takes about 2 seconds to go up 1000 points any ways, so the flow of incoming minerals would appear smooth even if it had to initiate the 1024 trigger multiple times.

If you wish to include Razing points, just use the Kills and Razings Score instead. And of course you realize that the owners of these triggers can be altered to suit your needs. =) Hope that helps.

DI
March 10, 1999




I tried to make a simple kill=cash systes several times. But I often didn't understand it so I was never able to put one up. I used this one. It works! But my problem is only that everytime I kill someone I get 200 minerals instead of 1 - which is my wish.

How to do that?

And by the way: I recommend this one to everyone that makes maps with huge prices.
Report, edit, etc...Posted by LegacyWeapon on 2005-02-14 at 06:38:08
People have been using that for years.
Actually, you should have the biggest transfer trigger at the top of the triggers.

To kill 1 unit and get 1 mineral is very difficult due to the fact that Kill Score has different values for every unit. There are multiple methods to use:
You should've checked the tutorials first tongue.gif
http://www.staredit.net/index.php?tutorial=81
http://www.staredit.net/index.php?tutorial=25
Report, edit, etc...Posted by Saox on 2005-02-14 at 07:20:34
Belive me, that I've searched over this site for that wink.gif. But I didn't understand theese instructions(bad english). In this case I have to ask you another question wink.gif.
QUOTE
Trigger

Description:
Method 1

Players:
¤  Players it applies to
Conditions:
¤  Current player Kills score is at least 1
Actions:
¤  Modify score for Current player: Set to 0 Kills

¤  Modify resources for Current player: Add 1 Minerals

¤  Preserve Trigger


This is actually taken from the link that you gave me. I saw many "methods". Does this mean, that there are several ways to do it? Which one do you reccomend then?


I remember that I tried to do it via the 2nd link you gave me. But it didn't work :/.
Could you write me a tutorial-for-idiots cause during my 2 years of mapping I could never solve this problem w00t.gif
Report, edit, etc...Posted by Puni(F) on 2005-02-14 at 07:24:37
Ill write you one once I get back home from school, Unless some one get's there before I do.
Report, edit, etc...Posted by Saox on 2005-02-14 at 11:06:14
Alright. I will wait for you to answer.(Hope it won't take too long).
Report, edit, etc...Posted by Puni(F) on 2005-02-14 at 12:11:30
Ok, Back, Ice rain owned my school, Okay, Now you want to know how to get minerals for kills...Okay here is a step by step tutorial... Follow evrey step I tell you.


First step: Make a new trigger
Second Step: Make the trigger for the player you want to get mineral's
Thrid Step: Make the condition "Current player Kills score is at least 1"
Fourth Step: Make the action's as followed,1.Modify score for Current player: Set to 0 Kills, 2. Modify resources for Current player: Add 1 Minerals, 3.Preserve Trigger


There hope that help's.
Report, edit, etc...Posted by Saox on 2005-02-14 at 14:31:42
O M F G! w00t.gif

After two years of hard work ;D I finally got this one with ease. Thank! You! It really works and gives me 1 minerall per every kill yawn.gif. How amazing!

Man, I owe you biggrin.gif , you've done/did (bad eng. sorry) a favour!
Report, edit, etc...Posted by DT_Battlekruser on 2005-02-14 at 18:57:09
Note it isn't perfect, even with Hypertriggers, multiple units killed simultaneously by splash damage will count as one.
Report, edit, etc...Posted by LegacyWeapon on 2005-02-14 at 18:58:58
QUOTE(DT_Battlekruser @ Feb 14 2005, 06:57 PM)
Note it isn't perfect, even with Hypertriggers, multiple units killed simultaneously by splash damage will count as one.
[right][snapback]145402[/snapback][/right]

I think he read the pros and cons from the tutorial tongue.gif
But yes that is very important. The only way to prevent that is the use the
Kills to Cash 'Perfect'
And even that isn't perfect.

Multiple units killed simultaneously regardless of splash damage will count as one.
Report, edit, etc...Posted by DT_Battlekruser on 2005-02-14 at 19:02:26
Legacy you being tutorial guy, you need to change the fact it says "can't be balanced for every unit" on the cons of the set to 0 method, it isn't true tongue.gif
Report, edit, etc...Posted by LegacyWeapon on 2005-02-14 at 19:25:43
QUOTE(DT_Battlekruser @ Feb 14 2005, 07:02 PM)
Legacy you being tutorial guy, you need to change the fact it says "can't be balanced for every unit" on the cons of the set to 0 method, it isn't true tongue.gif
[right][snapback]145414[/snapback][/right]

Why isn't it true that you can't balance it for every unit?
How would you balance it so that you get more minerals for killing a BC than a Marine?
Report, edit, etc...Posted by DT_Battlekruser on 2005-02-14 at 19:31:14
Ohhh, I was thinking it meant the opposite. I thought it was say it had same flaw as subtract method.
Report, edit, etc...Posted by DemonKilla on 2005-02-15 at 08:44:21
ya i had sme trouble with that to but i figgured out how to make it work
once i get home from school ill show u the correct way how to make this happen
Report, edit, etc...Posted by LegacyWeapon on 2005-02-15 at 18:02:57
QUOTE(Saox @ Feb 14 2005, 02:31 PM)
O M F G! w00t.gif

After two years of hard work ;D I finally got this one with ease. Thank! You! It really works and gives me 1 minerall per every kill yawn.gif. How amazing!

Man, I owe you  biggrin.gif , you've done/did (bad eng. sorry) a favour!
[right][snapback]145170[/snapback][/right]

Please read all posts in a topic before replying. This topic isn't flooded with over 100 posts you know... Also, he has already solved the problem.
Report, edit, etc...Posted by chuiu on 2005-02-15 at 18:39:43
What's going on with quotes?
Report, edit, etc...Posted by DT_Battlekruser on 2005-02-15 at 18:54:54
Nothing? I don't get it.
Report, edit, etc...Posted by LegacyWeapon on 2005-02-15 at 19:00:10
Very simply put: I was talking to DemonKilla.
Report, edit, etc...Posted by DT_Battlekruser on 2005-02-15 at 19:01:04
No, no I don't get what Chu's saying about quotes.
Report, edit, etc...Posted by chuiu on 2005-02-15 at 19:04:49
Maybe I just misunderstood why Legacy quoted Soax. When I put quotes above my text, it is because I'm reply to the quote. When I am making a post saying to look at someone elses post, I will add the quote under that text.
Next Page (1)