Staredit Network

Staredit Network -> UMS Assistance -> Yet another Kills to Cash
Report, edit, etc...Posted by linK_ on 2005-01-24 at 09:50:24
Hey there..!!

I wasted alot of time and thoughts in how to realize my kills to cash system...
In fact i though it will be easy, cauze i dont need different amount of cash for different units... All i wanted is to give a player 25 Minerals for every 5th Kill..

Sure there would be a hardcoded method of just do it like if palyer killed 5 units then add 25 minerals and then if palyer killed 10 units add... etc... but since i calculated the amout of my units with kills, that would mean i have to do this kind of trigger 100 times ... cauze in my map u can kill alot of dudeds!!

and to eb honest im to lazy to add nearly the same trigegr 100 times...

so i thought about a workaround on a system i saw in maze defense..
it works like this:

trigegr 1:

if players kills counter is minimum 1 , then add 1 xespin gase and substract 1 from payers kills counter! Repeat trigger

trigegr 2:

if player collect 5 vespin gas, then add 25 kinerals and set back vespin gas to 0!
Repeat Trigger....


i tested it and it works fine.. i added it under hyper triggers to make it work faster and in fact i like this method alltough its a bit slow...

BUT no i have one problem... once i killed a unit the counter does not stop .. i mean the system with the 2 trigegrs does not stop... but it should...

1st force attacking = 60 units.. if this payler kilsl them all, he has to get 300 minerals ... but once the 1st force attacked , the counter does not stop giving money alltuough no more units get killed...!


any ideas, help PLZ ?!
Thnx!

blushing.gif
Report, edit, etc...Posted by (U)Bolt_Head on 2005-01-24 at 10:11:38
QUOTE(linK_ @ Jan 24 2005, 08:50 AM)
trigegr 1:

if players kills counter is minimum 1 , then add 1 xespin gase and substract 1 from payers kills counter! Repeat trigger

trigegr 2:

if player collect 5 vespin gas, then add 25 kinerals and set back vespin gas to 0!
Repeat Trigger....
i tested it and it works fine.. i added it under hyper triggers to make it work faster and in fact i like this method alltough its a bit slow...

BUT no i have one problem... once i killed a unit the counter does not stop .. i mean the system with the 2 trigegrs does not stop... but it should...
[right][snapback]131391[/snapback][/right]


Once you kill units the fact that you have killed them doesn't change. You can't subtract KILLS. Only kill POINTS. Im guessing you used Kills for the condition of your first trigger and subtracted Kill Points, there differant.

My second guess is that you used kill Points for both but didn't realize you get more than one point for each unit. If you only SUBTRACT 1 kill point for everyone you get then it won't work out the way you intend it to be. Killing a zergling would give you minerals as if you killed 50 men. You need to use SET to 0 for that.

Not really sure why Chu closed this, its the right place. Maybe he just didn't see your question.
Report, edit, etc...Posted by chuiu on 2005-01-24 at 11:09:24
You're right, I did. But after reading his topic name and half his post, I just stopped and posted.
Report, edit, etc...Posted by Staredit.Net Essence on 2005-01-24 at 12:36:30
aint it the way most of the systems works? you can also replace vespene by units
Report, edit, etc...Posted by linK_ on 2005-01-24 at 19:01:17
QUOTE((U)Bolt_Head @ Jan 24 2005, 04:11 PM)
My second guess is that you used kill Points for both but didn't realize you get more than one point for each unit.  If you only SUBTRACT 1 kill point for everyone you get then it won't work out the way you intend it to be.  Killing a zergling would give you minerals as if you killed 50 men.  You need to use SET to 0 for that.



Allright.. it must be this caase, since i checked your 1st guess and it was setted allright.. But your 2nd case seems logical to me! i mean my trigger says:

IF killed enemy points is min 1 THEN substract 1 from killed enemys
One is a point system adn the other is the real count of kilsl right ?

So i guess thats what u ment with set to 0...

Can u plz explai this a bit more...
Thx alot for ya replie wink.gif
Report, edit, etc...Posted by chuiu on 2005-01-24 at 19:06:32
Basically what you want to do is this:

Conditions:
Player Kills score is at least 1.

Actions:
Modify Kills score for Player: Set to 0.
Modify Resources for Player: Add 1 Gas.
Preserve trigger.

Conditions:
Player accumulates at least 5 Gas.

Actions:
Modify Resources for Player: Subtract 5 Gas.
Modify Resources for Player: Add 1 Minerals.
Preserve trigger.

And to make it as accurate as possible per kill, you will need to use hyper triggers. There is a tutorial on them (see my sig for links).
Report, edit, etc...Posted by linK_ on 2005-01-24 at 19:15:29
QUOTE(Chu @ Jan 25 2005, 01:06 AM)
Basically what you want to do is this:

Conditions:
Player Kills score is at least 1.

Actions:
Modify Kills score for Player: Set to 0.
Modify Resources for Player: Add 1 Gas.
Preserve trigger.

Conditions:
Player accumulates at least 5 Gas.

Actions:
Modify Resources for Player: Subtract 5 Gas.
Modify Resources for Player: Add 1 Minerals.
Preserve trigger.

And to make it as accurate as possible... (trimmed)
[right][snapback]131655[/snapback][/right]



hey.. thx for the reply!

in fact i tried it this way allready... and u allready mentioned the problem.. the trigger dont shoot per kill.. it shoots only bout 70% ... i tried it also with 5 hyper triggers.. placed the add money triggers under them and still they not work accurate...

thats why im out of thoughts...
Report, edit, etc...Posted by LegacyWeapon on 2005-01-24 at 19:19:49
The trigger shoots everytime the player gains any kill score. It should be perfectly accurate unless you are using units that do massive amounts of splash damage.

Take a look at these tutorials:
http://www.staredit.net/index.php?tutorial=81
http://www.staredit.net/index.php?tutorial=25
Report, edit, etc...Posted by linK_ on 2005-01-24 at 19:29:19
hmm thx... ic..

and is there a way to change the kill points for units... so that everything counts only 1 @ kill points ?! happy.gif
Report, edit, etc...Posted by LegacyWeapon on 2005-01-24 at 19:33:45
No but there is a list tongue.gif
http://www.staredit.net/index.php?tutorial=108
Report, edit, etc...Posted by linK_ on 2005-01-24 at 19:41:20
hehe wink.gif ic.. well thx then tongue.gif

but what i dont understand is why this "set kill points to 0" trigegr does not work accurate for me... i added now 10 hyper triggers.. and i guess with splash damage u mean things like tank siege and firebat etc... they are not.. i mean none of them attack the units which should be converted to cash.. so this cant be the case...

ermm.gif
Report, edit, etc...Posted by chuiu on 2005-01-24 at 19:59:17
Are you sure your conditions are check for kills SCORE and not actual kills? The way you explain your problem in the first post it sounds like you might be using kills count and the trigger will run forever.

If that is still not it, and you can't find a single problem with your triggers the only other solution would be to post the map or a map with a copy of the triggers and events leading to running them.
Report, edit, etc...Posted by linK_ on 2005-01-25 at 08:49:03
yup im sure i use POINTS in both.. IF and THEN...
but i found out sumthing intresting!!

the triggers work accurate unaccurate... i mean i should get 300 minerals for 60 kills... but i only get the half of it... but this the whole time... so if i play my map 5 times, i always get the same score and minerals.. always just the half... so in fact it works accurate in killing... but it only gives me the half or better it only calculate with 1/2 ... its realyl excat 50% of what it should be... but this is like i saied accurate whole the time...

son in fact the trigegrs shoot fast but the converting is wrong, cauze it only gives me the half or calcualte the half...

any ideas ?
Report, edit, etc...Posted by chuiu on 2005-01-25 at 11:19:13
Are you using hyper triggers?

QUOTE
And to make it as accurate as possible per kill, you will need to use hyper triggers. There is a tutorial on them (see my sig for links).


Are you using splash units?

One problem with this system is that the triggers need to run really fast, mainly the kills to gas trigger. If you don't use hyper triggers, then you may be killing 5 or 6 guys before the trigger even runs a second time. That means 6 kills easily becomes 1 to the way you have your triggers setup. Also, even if you do have hyper triggers, splash damage may kill multiple units at once and the trigger won't fire fast enough no matter what you do to calculate all the different kills that happened.

It's just one of the drawbacks of this system. That is why I always use a strait Kills to Cash subtraction system. Something like 2000 kills to 1 ore, or whatever my map demands, and then I balance out the enemy units so that you dont get ripped off.
Report, edit, etc...Posted by (U)Bolt_Head on 2005-01-25 at 13:43:35
QUOTE(linK_ @ Jan 25 2005, 07:49 AM)
yup im sure i use POINTS in both.. IF and THEN...
but i found out sumthing intresting!!

the triggers work accurate unaccurate... i mean i should get 300 minerals for 60 kills... but i only get the half of it... but this the whole time... so if i play my map 5 times, i always get the same score and minerals.. always just the half... so in fact it works accurate in killing... but it only gi... (trimmed)
[right][snapback]132099[/snapback][/right]


That sounds like you made the trigger running for all players. But thats proboly only the case if you added waits or something else thats weird. Hard to tell without actually seeing the map.

Anyways this system will never be perfect especially if you have units that do spash damage or large battles. If you need a perfect sytem i suggest doing the 100 triggers you don't want to do. You can always use SC Trigger to make those trigger quicker thats its entire purpose.
Report, edit, etc...Posted by LegacyWeapon on 2005-01-25 at 15:11:24
Tutorial for SCTrigger
http://www.staredit.net/index.php?tutorial=78

Download for SCTrigger
http://www.staredit.net/index.php?download=880
Next Page (1)