• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

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