Is there a way to make kill to resource trigger? For example, every 25 kills you get 10 minerals, infinitely. I've read the tutorials in the TDB but didn't understand them. I used SC Trigger to do this, but the number of triggers is very high. Can someone show me how to make just a few triggers to accomplish this task?
What you do is when a player gets 1 kill, his kill score increases (we cannot subtract kills, only kill score). So we make the condition:
Current player's kill score is at least 1.
Then we want to add 1 to a counter and set kill score to 0. Actions:
Set kills score for Current player: Set to 0.
Add 1 to custom score.
Preserve Trigger
Then to make it so that you get 10 minerals after 25 kills
Conditions:
Current player's custom score is at least 25
Actions:
Subtract 25 custom score for current player.
Add 10 minerals.
Preserve Trigger
Do you understand now?
Nop there is much easier way if you are the only killer! Use death count!
Here I attached a trigger. Just chose everything you need! The only thing you must leave untouched is "substract 1 death"!
[attachmentid=11655]
Legacy's method is good enough.
Thanks LegacyWeapon! I understand that now, that works!

QUOTE(slayer766 @ Jul 12 2005, 06:57 PM)
Legacy's method is good enough.
[right][snapback]260785[/snapback][/right]
Yes it is, if you want to kill only one unit type or get the same score for zergling and ultralist! But in my trigger you can chose unit you kill and make a trigger for every unit type you need!
And your method is good enough if you are the only person killing stuff, which is hardly ever the case.
You should use hyper triggers with LegacyWeapon's method though, to reduce the chance of miscounting.
QUOTE(Heimdal @ Jul 12 2005, 08:23 PM)
And your method is good enough if you are the only person killing stuff, which is hardly ever the case.
You should use hyper triggers with LegacyWeapon's method though, to reduce the chance of miscounting.
[right][snapback]260870[/snapback][/right]
Yes, you are probably right. But how to get for example 1m for zergling and 2 for hidralisk?
QUOTE(LegacyWeapon @ Jul 12 2005, 09:32 PM)
You read this tutorial and understand it...
http://www.staredit.net/index.php?tutorial=81I just explained the first one to him. He didn't specify which units had how much money...
[right][snapback]260952[/snapback][/right]
Your tutorial is to long and boring so I didn't read it sorry.
If you want to learn you can't just not read it just because it is long and "boring". Nothing can always go your way. If it is too short then you cannot do it unless it is a very short thing. Besides there are a few methods just use one you think it good enough.
QUOTE(KaboomHahahein @ Jul 12 2005, 10:11 PM)
If you want to learn you can't just not read it just because it is long and "boring". Nothing can always go your way. If it is too short then you cannot do it unless it is a very short thing. Besides there are a few methods just use one you think it good enough.
[right][snapback]260986[/snapback][/right]
I am not here to learn but to help sam1. If I wanted to learn I would read even longer tutorials!
You asked this question so I answered it...
QUOTE(DEAD @ Jul 12 2005, 01:44 PM)
But how to get for example 1m for zergling and 2 for hidralisk?
[right][snapback]260897[/snapback][/right]
DEAD's way is good if you want to share kills though.
Sharing kills isn't too bad, is it?
QUOTE(Subrosian @ Jul 12 2005, 11:18 PM)
DEAD's way is good if you want to share kills though.
Sharing kills isn't too bad, is it?
[right][snapback]261041[/snapback][/right]
Yea thats a good idea for multiplayer RPG. Like in Diablo2 party members share Xp!
First I think I have to state my situation: It's a Sunken defense map, every 10 kills gives current player 1 mineral. There are units that do splash damage in the game. The units I want to kill are 32 unique types of units (units and heroes).
Ok, after some testing of LegacyWeapon's trigger, I found problems. It's good, if you kill units one by one. However, if you kill several units at the same time, the kill score is still "at least" 1, and you only get 1 custom point, but you should get, for example, 5 custom points if you killed 5 units, but you only get 1 because you killed 5 units at the same time. For example, after 144 kills of units, I only got 9 minerals, but I should get 14 minerals. I used hyper triggers and the problem still exists. Triggers created by SCTrigger are very accurate but increase the number of triggers, which I thought slows the game down greatly.
The reason that I'm here asking how to make kill to resource trigger infinitely, is because I don't want my number of triggers to be very high, it might cause massive lag in game.(I've already tested with some people with my old version of the map, there was no lag at all. However in my new map where there are a lot more triggers than the old version, the game goes very slow.) Otherwise, I think, SCTrigger is fine with me.
Or maybe the reason the game goes very slow with my new version is because too many sprites/units are present on the map, but I don't think so.
Defense maps are a special case in that there's only one possible unit type that you can kill at any given time. Either use the link LW just posted, or this:
Overview:
Maintain a counter that is the current level (you probably already have this)
On each level, use kill score conditions in multiples of the kill value of the unit for that level
For each level, make a trigger as follows:
| Trigger |
| Conditions: |
¤ Current level is <unit x>
|
| ¤ Current player kill score is at least <kill score for unit x> |
| Actions: |
¤ Subtract <kill score for unit x> from kill score for current player
|
¤ Add 1 custom score for current player
|
| ¤ preserve trigger |
And then finally the trigger:
| Trigger |
| Conditions: |
| ¤ Current player custom score is at least 10 |
| Actions: |
¤ Subtract 10 custom score for current player
|
¤ Add 1 mineral for current player
|
| ¤ preserve trigger |
This system has the advantage that it will never be wrong, but you need 1 trigger for every level.
QUOTE
Triggers do not lag the game
Oh yes they can, especially hyper triggers. Have those set up with a bunch of other triggers running and it'll lag on a big map. It happened on one of my maps, and as soon as I deleted the hyper triggers it ran smoothly.
That's because it was doing something with the graphics or sounds of the game. Triggers by themselves will not lag the game.
If you set up a million hypers in a map and nothing else, the map will not lag.
If you set up 5 hypers and then spawn marines at random places while remove a certain number at the same time telling lurkers to be burrow stuck, then you might have some lag. Deleting the hypers will slow down the triggers that are making SC graphics.
QUOTE
If you want to perfectly count every unit to infinity, use this system:
http://www.staredit.net/index.php?tutorial=25However that requires a computer player to be a score keeper, which I don't have an empty slot for it. There are 6 human players (defenders) and 2 computer players (enemies). Yes, the computers normally wouldn't attack, but if someone walls they will attack and screws up the counter. Is it possible to use player 12 as the score keeper? Player 12 won't attack no matter what unless I use triggers to tell them to do so.
QUOTE
Triggers do not lag the game, UNITS and SPRITES will.
Are map revealers counted as units? I had map revealers for every player in the my old version of the map and yet they didn't cause lag at all. In my new version, I removed every player's map revealers and instead put revealers for player 7 only and use the trigger "Turn shared vision on".
Player 12 cannot run triggers.
QUOTE
Player 12 cannot run triggers.
Yes they can I have a Player 12 trigger.
Player 12 cannot directly own triggers, nor can they directly run them. Most of those triggers can be run by other players (1-8) to affect player 12.
QUOTE
Defense maps are a special case in that there's only one possible unit type that you can kill at any given time. Either use the link LW just posted, or this:
Overview:
Maintain a counter that is the current level (you probably already have this)
On each level, use kill score conditions in multiples of the kill value of the unit for that level
For each level, make a trigger as follows:
Trigger
Conditions:
¤ Current level is <unit x>
¤ Current player kill score is at least <kill score for unit x>
Actions:
¤ Subtract <kill score for unit x> from kill score for current player
¤ Add 1 custom score for current player
¤ preserve trigger
And then finally the trigger:
Trigger
Conditions:
¤ Current player custom score is at least 10
Actions:
¤ Subtract 10 custom score for current player
¤ Add 1 mineral for current player
¤ preserve trigger
This system has the advantage that it will never be wrong, but you need 1 trigger for every level.
That's a good way. However, after each level you probably have some leftover kill scores, and those leftovers will add up to kill scores of next level, and it will screw up the system.