Hey, I need a trick to detect killing a unit that has vHP... I use flying units as projectiles that are shot by a player to hit another. The flying units are detected using a give, center location, and give back system. Wat i need is to detect who killed who. There are up to 6 players warring at the same time. The perfect example would be Galactic Gunnerz (yea, this map again!) in wich you get money by destroying units this way.
None.
How are the projectiles in your map fired?
None.
You got a tank wich has a loc centered on it, you got an observer wich also got one, and you create zealots at a gateway to shoot bullets
Player 1
Current player commands at elast one Protoss Zealot
Current player commands at least one Tank
Create one Terran Wraith at 'Red Tank'
Order to all Terran Wraith to move from 'Tank' to 'Red Observer'
Preserve Trigger
Player 2
Foes brings at least 1 Terran Wraith at 'Blue Tank'
Kill 1 Terran Wraith for Player 1 at 'Blue Tank'
Set Death Counts for HP(%) substract 1
Preserve Trigger
Why does it writes it in code form???
None.
Wait, doesn't that second trigger basically solves your problem? You just need to do a trigger for each player, and award them, rather than detecting when Foes bring a wraith there.
None.
Yea, it works when hitting the player, but when the tank vHP currently gets to 0 %, won't it be difficult to detect?
None.
Not really, if you separate it to detect different player's wraiths hitting it when it has 1% left, you can tell who got the kill.
None.
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
Your triggers already detect it. (being hit)
Whatever actions you want for the shooter execute them there for current player. For example set a dc or custom score.
EDIT: sry wrote the above 2h ago.
Yeah make a copy of the being hit trigger and and add a condition "foes brings at most 0/1 vHP to blue tank"
The first of those copies will run where there's a kill, stopping the 2nd from running, as the wraith got killed already.