I've got a new, quite simple map, in wich 12 players will try to select a unit, as fast as possible. The problem i have is that i can't find a way to get the player who selected the unit first into a variable. The only thing i manage to get is player 16, and it makes me mad... JASS or gui doesn't matter, as long as there's a solution to it.
As you might see, the frog will be damaged if it's selected and when someone kills it, that player wins. The thing is that atm i don't know who won.
thank you
-
frogHit
-
Events
-
Unit - Frog 0003 <gen> Is selected
-
-
Conditions
-
Actions
-
Unit - Cause (Triggering unit) to damage (Triggering unit), dealing 100.00 damage of attack type Chaos and damage type Divine
-
Unit - Create 1 dummy frogHit for Neutral Passive at (Position of (Triggering unit)) facing Default building facing degrees
-
Unit Group - Add (Last created unit) to frogHit
-
Unit - Move realFrog instantly to (Random point in (Current camera bounds))
-
Game - Display to (All players) for 3.00 seconds the text: (Frog hp: + (String((Life of realFrog))))
-
Wait 2.50 seconds
-
Unit Group - Pick every unit in frogHit and do (Actions)
-
Loop - Actions
-
Unit - Remove (Picked unit) from the game
-
-
-
-
As you might see, the frog will be damaged if it's selected and when someone kills it, that player wins. The thing is that atm i don't know who won.
thank you