Hey all,
I want to ask you is there any way to detect the highest number(integer) between 8 different numbers(integers)? I am tracking hero kills and at the end of map i wan't to make something like board with highest kills etc..
Hey all,
I want to ask you is there any way to detect the highest number(integer) between 8 different numbers(integers)? I am tracking hero kills and at the end of map i wan't to make something like board with highest kills etc..
^Yeah, that might work. But if he want's to print text to screen it won't help.
Here's a trigger that takes a tie into account, it might need some optimizing though:
Untitled Trigger 013
Events
Conditions
Actions
Set Temp_Integer_1 = 0
For each (Integer A) from 1 to 8, do (Actions)
Loop - Actions
Set Temp_Player_Array[(Player number of (Player((Integer A))))] = Neutral Passive
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Temp_Integer_Array[(Integer A)] Greater than 0
Temp_Integer_Array[(Integer A)] Greater than or equal to Temp_Integer_Array[9]
Then - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Temp_Integer_Array[(Integer A)] Equal to Temp_Integer_Array[9]
Then - Actions
Set Temp_Integer_1 = (Temp_Integer_1 + 1)
Else - Actions
Set Temp_Integer_1 = 1
For each (Integer B) from 1 to 8, do (Actions)
Loop - Actions
Set Temp_Player_Array[(Player number of (Player((Integer B))))] = Neutral Passive
Set Temp_Player = (Player((Integer A)))
Set Temp_Player_Array[(Player number of (Player((Integer A))))] = (Player((Integer A)))
Set Temp_Integer_Array[9] = Temp_Integer_Array[(Integer A)]
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Temp_Integer_1 Equal to 1
Then - Actions
Game - Display to (All players) the text: ((Name of Temp_Player) + has won!)
Else - Actions
For each (Integer B) from 1 to 8, do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Temp_Player_Array[(Player number of (Player((Integer B))))] Not equal to Neutral Passive
Then - Actions
Game - Display to (All players) the text: ((Name of Temp_Player_Array[(Player number of (Player((Integer B))))]) + has won with a tie!)
Else - Actions