PDA

View Full Version : Trigger Help


dummbatz
05-05-2005, 7:54 PM
Hey, if anyone could help me with converting kills into cash, specifically it goes kinda like this: If I kill one civilian, I want to get one mineral, but with preserve trigger, I get one every second. Heh, need help!

MidnightGladius
05-05-2005, 8:10 PM
That's because you're trying to subtract kills. It doesn't work that way. You can subtract kill SCORE, but not kills themselves. However, this gets annoying because each unit has a different score. If you're only killing civs, make it so that:

C: Current player kill score is at least 1
A: Set kill score to 0
A: Add 1 Mineral for Current Player
A: Preserve

There are better ways, but that one's the simplest for the scenario you set.

dummbatz
05-05-2005, 8:11 PM
Ah, thanks! Haven't used map editor in six months, but thanks!

Shalk
05-20-2005, 11:05 AM
ok the problem is u have cant put preserve cuz it wont work what u have to do is next:
conditions-kill at least(number)civilians
actions-add (1) mineral
then u have to repeat thesse trigger lots of times but changing the actions like this:
actions-add(2)mineral
repeat
actions-add(3) mineral,etc...
I HOPE THAT HELPS U!!!!
GOOD LUCK

BrotherGreen
05-20-2005, 1:37 PM
ACtually, thats just stupid.

Midnight Gladius' way would work way better, until you needed to kill multiple types of units...

BSTRhino
05-21-2005, 5:39 AM
Midnight Gladius describes the easiest way to do it, but each unit has a different kill score, but generally the kill scores are between 100-2100, and so you won't get one mineral per kill.

Shalk's way is actually the cleanest way to do a one-kill-one-mineral system, even if it takes a lot longer to do. There was a program called SCTrigger invented to do these triggers because it takes so long to do it this way.

There are alternatives, I saw someone do something with the "least kills" condition, which will always work but requires you to place photon cannons on the map to do extra killing for other players, so it's not exactly clean, but it adds less to your map file size than SCTrigger.

Kingscrab
05-25-2005, 9:50 PM
That's because you're trying to subtract kills. It doesn't work that way. You can subtract kill SCORE, but not kills themselves. However, this gets annoying because each unit has a different score. If you're only killing civs, make it so that:

C: Current player kill score is at least 1
A: Set kill score to 0
A: Add 1 Mineral for Current Player
A: Preserve

There are better ways, but that one's the simplest for the scenario you set.
Sweet! i have always wanted to know how to do that actually... thanks! :)

One question for dummbatz: How many civilians are gonna get killed? Are we talkin' like 5, 10 or 1000? If it's only like 5 you could do it the long way...

P1 KILLS exactly 1 CIVILIAN,
MODIFY RESOURCES - ADD ONE MINERAL

and then repeat trigger:

P1 KILLS exactly 2 CIVILIAN
MODIFY RESOURCES - ADD ONE MINERAL and so on... but that's kind of a headache.
EDIT: HA! Shalk just said that i think... oops...