I'm working on an scv rush map with scv's and widow mines only. I want to make it so that every time say player1 kills an scv that player2 owns, player2 gains an amount of gas. I see that you can set the reward for killing an scv and yes I've considered making it so that you lose gas when killing other scv's, but I want it to work the way I described previously.
I'm not sure there's a simple solution with data, but it would be really easy to do this with triggers. You'd make an event that triggers whenever a unit dies, make a condition to check if the unit type of the unit that died = SCV, then add that amount of gas to the triggering unit's owner (and subtract that amount from the other player, if you want).
Data version: Buff type behavior on the SCV with a Damage Response (on Defender) that applies a Modify Player effect. Make sure the "fatal" flag is enabled in the damage response options and adjust the other filters to your liking (you can, for example, ensure only enemies of the SCV owner gain this loot). I don't remember which scope you need on the Modify Player effect, but it's either Source or Target.
Units also have fields for giving loot, but I haven't looked into that at all. This definitely is the better option if you want them to drop pickups.
Ok that makes sense.
I made the trigger, added event "Unit - any unit dies" (not sure how to change that to an scv)
Conditions would be "and", then this is where I'm totally lost xD
I'm not so good with triggers, could you walk me through making this trigger?
Buffs are confusing for me :P and no I don't want it to be a drop, I'd like it to work right away just like how for example Zone Control 4 has you earn minerals for killing enemy marines, I want the reverse to work when your marine dies to an enemy marine, you gain gas. Thanks for the idea tho
I'm working on an scv rush map with scv's and widow mines only. I want to make it so that every time say player1 kills an scv that player2 owns, player2 gains an amount of gas. I see that you can set the reward for killing an scv and yes I've considered making it so that you lose gas when killing other scv's, but I want it to work the way I described previously.
Anyone know how to make this work?
I'm not sure there's a simple solution with data, but it would be really easy to do this with triggers. You'd make an event that triggers whenever a unit dies, make a condition to check if the unit type of the unit that died = SCV, then add that amount of gas to the triggering unit's owner (and subtract that amount from the other player, if you want).
Data version: Buff type behavior on the SCV with a Damage Response (on Defender) that applies a Modify Player effect. Make sure the "fatal" flag is enabled in the damage response options and adjust the other filters to your liking (you can, for example, ensure only enemies of the SCV owner gain this loot). I don't remember which scope you need on the Modify Player effect, but it's either Source or Target.
Units also have fields for giving loot, but I haven't looked into that at all. This definitely is the better option if you want them to drop pickups.
@Darkyvm: Go
Ok that makes sense. I made the trigger, added event "Unit - any unit dies" (not sure how to change that to an scv) Conditions would be "and", then this is where I'm totally lost xD
I'm not so good with triggers, could you walk me through making this trigger?
@Photoloss: Go
Buffs are confusing for me :P and no I don't want it to be a drop, I'd like it to work right away just like how for example Zone Control 4 has you earn minerals for killing enemy marines, I want the reverse to work when your marine dies to an enemy marine, you gain gas. Thanks for the idea tho
@EagleXs: Go
Try something like this:
Event: Any Unit dies
Condition: Comparison: Unit type of Triggering Unit = SCV
Actions:
Modify Player property - Owner of Triggering Unit - Vespene - Add [amount]
Modify Player property - Owner of Killing Unit - Vespene - Subtract [amount] (if you want to subtract vespene from the killer)
I haven't tested it but I see no reason for this not to work.