• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

How to check who has the highest 'Kills' Equal Victory ?

Status
Not open for further replies.
Level 6
Joined
Mar 9, 2009
Messages
175
How to check who has the highest 'Kills' on leaderboard Equal Victory ?:grin::grin:
Check every seconds ? Issit right?

Please help me guys !:grin:


Thanks alot:ogre_kawaii:
 
Last edited:
Level 9
Joined
Apr 26, 2011
Messages
403
First :

create variable to store total kill

Total_kill[1-10] // 1 per player, 10 players

Next :
Create Trigger to update total kill

Unit - A unit dies.
set temp_integer = player number of (killing unit)
set Total_kill[temp_integer] = Total_kill[temp_integer] +1

Now :
at the end of fight, find out who have highest kill :

set highest_player_id = 1
for every number A from 1 to 10 do
if total_kill[A] > total_kill[highest_player_id] then
set highest_player_id = A

display message to everyone : playername(highest_player_id) has Highest Kill : total_kill[highest_player_id]
 
Status
Not open for further replies.
Top