• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

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 8
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