Niley
Mortal
posted 30 July 2019 02:44 PM EDT (US)
Hello, everyone!
I want to make a kind of tower defense game for multiplayer and I'm looking for a way to apply a buff (modify protounit) to the one player who manages to kill certain gaia units around the map. So basically a game with the twist of collecting buffs.
Example:
Player 3 kills a gaia chimera and from that gains a +2 attack damage for all their heroes.
My problem is that I somehow need to check the kills of different players against certain unit types, best would be if I can check what player the killed units belonged to. Army commands don't help since I can put the units into armies but still can't check who killed them.
I already tried to use the advanced triggers by pftq but those don't seem to enable this very specific feature.
Please tell me if there's a trigger set that could help me or if you know how to create such a custom trigger!
Thank you very much!
nottud
Demigod
posted 31 July 2019 01:07 PM
EDT (US)
1 / 6
This is quite difficult - I guess on unit death you do a search for the player who has a unit closest to it and grant the buff to them?
There is also the unit killed cost stat value that might help - you could set the cost of the gaia units to ludicruosly high values and then check for which of the high values the player;s stat changed by which would tell you which player got the kill.
Niley
Mortal
posted 12 August 2019 11:38 AM
EDT (US)
6 / 6
Woah, thanks! I will try this out asap