How do you make a trigger whee you gain money from killing an enemy? I mean, a trigger that constantly works like that instead of doing it once.
Post has been edited 1 time(s), last time on May 4 2010, 7:56 pm by StarBlue. Reason: thanks for not closing it right away
None.
The easiest way it to use Kill Score and give money when it's not 0, then set it to 0.
None.
I never did understand the whole score giver thing, please explain more.
None.
Current Player has at least 1 Kills Score:
Modify resources for Current Player: Add one mineral
Modify score for Current Player: Set to 0 for Kills Score
None.
no it's the adding score I never got... I don't really know why, just another one of nature's wonders, chronic amnesia.
None.
You use the Set Resources action to give minerals/gas, which is what I assume you want.
None.
The thing is, I just can't figure out how to make it. Please just post the trigger(s).
None.
We can't explain the universe, just describe it; and we don't know whether our theories are true, we just know they're not wrong. >Harald Lesch
The thing is, I just can't figure out how to make it. Please just post the trigger(s).
He did:
Quote from name:TassadarZeratul
Current Player has at least 1 Kills Score:
Modify resources for Current Player: Add one mineral
Modify score for Current Player: Set to 0 for Kills Score
More methods:
http://www.staredit.net/wiki.php?article=Kills_to_cash
Are you using SCMDraft? Triggers are easier to code with it.
None.
He only put part of the trigger mechanism in. I don't know how to add a score count to begin with.
None.
The trigger I posted will give one mineral whenever you kill something. What don't you get?
EDIT: I'm assuming you're doing a tower defense or similar. If you're doing an RPG or something along those lines, where it matters what type of unit was killed, then it'll be a bit more complicated, but not much.
None.
He only put part of the trigger mechanism in. I don't know how to add a score count to begin with.
No, the trigger provided is everything required to get a basic cash system working.
Kill scores are inherent properties of all units. Much like marines always cost 1 supply and zealots always cost 2 psi, every unit in the game has a kill score by default that cannot be altered by the map editor. Whenever a player kills a unit, their kill score is increased by that fixed value, which I believe is 50 for marines, and ranges up from there for more powerful units.
Note that the trigger provided is *basic*, if you kill 2 units at the same instant, eg through splash damage or multiple units attacking, then you will only gain 1 ore, and not 2. To get around this limitation requires much gymnastics, and still isn't ideal - see kills to cash perfect as Nude linked above.
None.
We can't explain the universe, just describe it; and we don't know whether our theories are true, we just know they're not wrong. >Harald Lesch
He only put part of the trigger mechanism in. I don't know how to add a score count to begin with.
You don't have to add it. Whenever you kill something your kills score goes up automatically. Don't confuse it with kills, because we can't modify those.
Now stop trying to be the uber clueless noob, because that's starting to go on my nerves and just do what you are told.
If you want a display of the score to see for everyone, add the trigger action display leaderboard: Score, Kills. But that's just a display and not needed for the triggers to work.
EDIT:
Oh and I just noticed: Your topic name is inappropriate. You have to choose something descriptive or I'll have to close it.
Consider yourself lucky I didn't notice it before or I would've closed it immediately.
Post has been edited 1 time(s), last time on May 4 2010, 12:20 pm by NudeRaider.
He only put part of the trigger mechanism in. I don't know how to add a score count to begin with.
You don't have to add it. Whenever you kill something your kills score goes up automatically. Don't confuse it with kills, because we can't modify those.
Nude is right. The score of kills goes up whenever a player makes a kill automatically; the game adds to the player's score. The score of kills is different from the number of kills. A number of kills is completely separate from the amount of a player's kill score.
Every single unit that is killed gives a player a specific amount of points. What you need to do is detect when one of these specific amounts is met, and then act upon it. Here is an example:
Current player score kills is exactly 25 <--
This detects the specific score amount for kills. When a player kills a broodling they receive 25 points.Set current player score kills to 0 <--
This sets the player's kill score back to zero so the trigger can fire again when another broodling is killed.Set minerals for current player add 1 mineral ore <--
This rewards the player for the kill.Preserve trigger <--
This makes sure the trigger will fire more than just a single time.
None.
O_O Woah... I am a little freaked out by the fact that I was JUST thinking about NudeRaider getting mad, and then reading his post not five seconds later. Anyways, back to the subject. Triggers can be a really big hassle sometimes -_- especially for someone who JUST started mapping. I thank you for putting up with me, but I do ask that you at LEAST take in the fact that I JUST started mapping not a week ago. I will try and hopefully it will work.
Post has been edited 1 time(s), last time on May 4 2010, 8:00 pm by StarBlue. Reason: Incorrect Grammer
None.
Ok, it works, thanks guys.
None.