Staredit Network > Forums > SC1 UMS Mapmaking Assistance > Topic: Help with Money Giving
Help with Money Giving
This topic is locked. You can no longer write replies here.
May 3 2010, 11:03 pm
By: StarBlue  

May 3 2010, 11:03 pm StarBlue Post #1



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.

May 3 2010, 11:08 pm Biophysicist Post #2



The easiest way it to use Kill Score and give money when it's not 0, then set it to 0.



None.

May 3 2010, 11:09 pm StarBlue Post #3



I never did understand the whole score giver thing, please explain more.



None.

May 3 2010, 11:14 pm Biophysicist Post #4



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.

May 3 2010, 11:16 pm StarBlue Post #5



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.

May 3 2010, 11:17 pm Biophysicist Post #6



You use the Set Resources action to give minerals/gas, which is what I assume you want.



None.

May 3 2010, 11:22 pm StarBlue Post #7



The thing is, I just can't figure out how to make it. Please just post the trigger(s).



None.

May 3 2010, 11:35 pm NudeRaider Post #8

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

Quote from StarBlue
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




May 3 2010, 11:57 pm Aristocrat Post #9



Are you using SCMDraft? Triggers are easier to code with it.



None.

May 4 2010, 2:49 am StarBlue Post #10



He only put part of the trigger mechanism in. I don't know how to add a score count to begin with.



None.

May 4 2010, 2:55 am Biophysicist Post #11



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.

May 4 2010, 3:42 am Lanthanide Post #12



Quote from StarBlue
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.

May 4 2010, 4:23 am Ultraviolet Post #13



Quote from Lanthanide
Quote from StarBlue
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.

The kill score for a marine is 100, actually. The formula to calculate kill score is mineral cost x 2 + gas cost x 4 = kill score. However, this isn't accurate in all instances, because through the course of balancing StarCraft, Blizzard changed some unit prices, but never updated their kill score. An example of this is the science vessel. Currently, it costs 100 minerals and 225 gas, so with our formula, we would calculate that its kill score should be 2*100 + 4*225 = 1100. It's kill score is actually 1250, because it used to cost 75 minerals and 275 gas, IIRC. When finding kill scores, I always use DatEdit.




May 4 2010, 12:13 pm NudeRaider Post #14

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

Quote from StarBlue
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.




May 4 2010, 3:56 pm CecilSunkure Post #15



Quote from NudeRaider
Quote from StarBlue
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.

May 4 2010, 7:59 pm StarBlue Post #16



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.

May 4 2010, 8:59 pm StarBlue Post #17



Ok, it works, thanks guys.



None.

Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[01:19 pm]
Vrael -- IM GONNA MANUFACTURE SOME SPORTBALL EQUIPMENT WHERE THE SUN DONT SHINE BOY
[01:35 am]
Ultraviolet -- Vrael
Vrael shouted: NEED SOME SPORTBALL> WE GOT YOUR SPORTBALL EQUIPMENT MANUFACTURING
Gonna put deez sportballs in your mouth
[2024-5-01. : 1:24 pm]
Vrael -- NEED SOME SPORTBALL> WE GOT YOUR SPORTBALL EQUIPMENT MANUFACTURING
[2024-4-30. : 5:08 pm]
Oh_Man -- https://youtu.be/lGxUOgfmUCQ
[2024-4-30. : 7:43 am]
NudeRaider -- Vrael
Vrael shouted: if you're gonna link that shit at least link some quality shit: https://www.youtube.com/watch?v=uUV3KvnvT-w
Yeah I'm not a big fan of Westernhagen either, Fanta vier much better! But they didn't drop the lyrics that fit the situation. Farty: Ich bin wieder hier; nobody: in meinem Revier; Me: war nie wirklich weg
[2024-4-29. : 6:36 pm]
RIVE -- Nah, I'm still on Orange Box.
[2024-4-29. : 4:36 pm]
Oh_Man -- anyone play Outside the Box yet? it was a fun time
[2024-4-29. : 12:52 pm]
Vrael -- if you're gonna link that shit at least link some quality shit: https://www.youtube.com/watch?v=uUV3KvnvT-w
[2024-4-29. : 11:17 am]
Zycorax -- :wob:
[2024-4-27. : 9:38 pm]
NudeRaider -- Ultraviolet
Ultraviolet shouted: NudeRaider sing it brother
trust me, you don't wanna hear that. I defer that to the pros.
Please log in to shout.


Members Online: Roy