Staredit Network > Forums > SC1 UMS Mapmaking Assistance > Topic: [SOLVED] Kills for Cash
[SOLVED] Kills for Cash
This topic is locked. You can no longer write replies here.
Aug 11 2012, 5:10 am
By: FlameViper  

Aug 11 2012, 5:10 am FlameViper Post #1



First of all... In how many ways can this go wrong?

Player 8 is Computer.
Players 1-7 are human.

Conditions:
Current Player kills at least 1 Supply Depot
Current Player has suffered exactly 0 deaths of Supply Depot
Player 8 has suffered at least 1 deaths of Supply Depot
Actions:
Modify death counts for Current Player: Add 1 for Supply Depot

Conditions:
Current Player kills at least 1 Supply Depot
Current Player has suffered at least 1 deaths of Supply Depot
Player 8 has suffered at least 1 deaths of Supply Depot
Actions:
Modify resources for Current Player: Add 1 mineral
Modify death counts for Player 8: Set to 0 for Supply Depot
Modify death counts for Current Player: Set to 0 for Supply Depot



None.

Aug 11 2012, 5:23 am Mouse Post #2



First off: You can't reset kills so that won't work. You will need to use a razings count to detect what buildings the player kills. You can find a razing/kills list here. For your example, the razings score of a Supply Depot is 150. So here's an example trigger:

Conditions:
Current players Score (Razings) is exactly 150
Player 8 has at least 1 deaths of Supply Depot

Actions:
Set Score for Razings to 0
Set deaths for Player 8 set to 0 for Supply Depot
(Insert whatever you want here ie. a mineral bonus)
Preserve Trigger

I don't believe that killing your own buildings gives you razings. But if it does, then you can do this:

Conditions:
Current players Score (Razings) is exactly 150
Current Player has at least 1 deaths of Supply Depot

Actions:
Set Score for Razings to 0
Set deaths for Current Player set to 0 for Supply Depot
Preserve Trigger

Also: FIRST POST WOOOHH!!!



None.

Aug 11 2012, 6:05 am staxx Post #3



Well, it all depends on what your needs are. If you want kills for men and buildings then you would use "kills and razings score". If you just want a kills to cash system for only killing men then use "kills score" and likewise for only buildings.

As for your triggers, and mouse's triggers. Both should be scrapped as they are both flawed.

It should look something like this.

Conditions.
Current players razings score is at least 150
player 8 has suffered at least 1 death of supply depot


Actions
Add mineral amount
Set score SUBTRACT 150 razings
Set Deaths for player 8 SUBTRACT 1 for supply depot
Preserve


The reason you do subtract instead of set is in case you kill multiple supply depots within less than a second of each other. You will be rewarded for all supply depots killed instead of just 1.

It should also be noted that you should set these triggers up to reset on killing player 1-7 units. For example, player 1 kills player 2's supply depot. player 1 will have a razing score of 150. this 150 will sit stagnant until someone kills one of player 8's supply depots. If player 2-7 kill a player 8 supply depot, player 1 will get the reward for it because triggers run in order player 1 first player 8 last.

So to prevent this from happening you would set something up like whats listed above except you would replace player 8 with players 1-7. (*EDIT - Without the reward obvioustly. Don't think you need to be told, but you never know)

Furthermore, you will need to arrange these triggers on your list in order from highest to lowest for razings amount.

Post has been edited 1 time(s), last time on Aug 11 2012, 6:17 am by staxx.



None.

Aug 11 2012, 6:17 am Roy Post #4

An artist's depiction of an Extended Unit Death

This question is probably the most often asked question in this forum.

Here's a bunch of implementations in the wiki: http://www.staredit.net/starcraft/Kills_to_cash

Here's some previous topics that you might find to have insightful answers:




Aug 11 2012, 3:31 pm Mouse Post #5



@Staxx: He specifically said a Supply Depot that's why I was talking about a razings list. Btw you gave him almost the exact same information I did except you did subtract instead of set to 0. And Staxx I have never had to arrange my triggers in order from highest to lowest and it works fine lol.. But have your own methods is okay.

@Flameviper: It's really simple to use kills to cash systems. If you want them to be all the same (maybe give 5 minerals for each kill), then say if Score of Kills and Razings is at least 1, then set Score of Kills and Razings to 0 and add 5 minerals. It's a really easy system. If you want them individually to give different rewards, then you have to find each Kill Score or Razings for each unit. Kills are for units and razings are for buildings.



None.

Aug 11 2012, 7:43 pm staxx Post #6



Quote from Mouse
@Staxx: He specifically said a Supply Depot that's why I was talking about a razings list. Btw you gave him almost the exact same information I did except you did subtract instead of set to 0. And Staxx I have never had to arrange my triggers in order from highest to lowest and it works fine lol.. But have your own methods is okay.

I didnt say yours wouldnt work, i said it was flawed. If you read through the entire post i explain why you use subtract instead of set. Also i use at least instead of exactly for the same reason you use subtract instead of set. Your method will fire until the player has killed 2 or more supply depots before the trigger has ran for them. Why? Because the player will not have exactly 150 razings, they will have 300+ razings at that point.

Either way, Roy has given him a sufficient amount of information for him to read over covering a few variances of kills to cash.

To answer your uncertainty in your initial post, no you do not get razings for killing your own buildings.



None.

Aug 11 2012, 8:31 pm Mouse Post #7



But if he had hyper triggers he would not have that problem of the triggers recycling. The only problem I could see would be splash damage and he wasn't' giving me very specific information that I would need to include that in there.



None.

Aug 11 2012, 8:40 pm Biophysicist Post #8



Quote
But if he had hyper triggers he would not have that problem of the triggers recycling. The only problem I could see would be splash damage and he wasn't' giving me very specific information that I would need to include that in there.
No. Two Supply Depots at 1 HP, each attacked by a different Marine at once. Blam, broken triggers. Always go with the option that works more generally unless you have a good reason not to.



None.

Aug 11 2012, 9:08 pm staxx Post #9



Mouse, below is a map using your system. Maybe this will help you understand why it wont work.

Attachments:
BrokenKillsToCash.scm
Hits: 0 Size: 51.85kb



None.

Aug 12 2012, 5:37 pm Mouse Post #10



kk I see what you mean Bio.



None.

Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[09:19 am]
Linekat -- cool
[01:56 am]
Oh_Man -- cool bit of history, spellsword creator talking about the history of EUD ^
[09:24 pm]
Moose -- denis
[05:00 pm]
lil-Inferno -- benis
[2024-4-19. : 10:41 am]
v9bettel -- Nice
[2024-4-19. : 1:39 am]
Ultraviolet -- no u elky skeleton guy, I'll use em better
[2024-4-18. : 10:50 pm]
Vrael -- Ultraviolet
Ultraviolet shouted: How about you all send me your minerals instead of washing them into the gambling void? I'm saving up for a new name color and/or glow
hey cut it out I'm getting all the minerals
[2024-4-18. : 10:11 pm]
Ultraviolet -- :P
[2024-4-18. : 10:11 pm]
Ultraviolet -- How about you all send me your minerals instead of washing them into the gambling void? I'm saving up for a new name color and/or glow
Please log in to shout.


Members Online: Moose, Roy