HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Leaderboard Probs

08-25-2003, 06:38 PM#1
Verjigorm
Hi guy,

I got a problem with completing my leaderboard.
It looks like this:

TEAM1 Kills
PLAYER1 Kills
PLAYER2 Kills
PLAYER3 Kills
TEAM2 Kills
PLAYER4 Kills
PLAYER5 Kills
PLAYER6 Kills
TEAM3 Kills
PLAYER7 Kills
PLAYER8 Kills
PLAYER9 Kills
TEAM4 Kills
PLAYER10 Kills
PLAYER11 Kills
PLAYER12 Kills

I added the teams players but I really don't know how to add the team kills that are of course the kills of P1+P2+P3 for Team 1.

My trigger looks like this so far:

Create Leaderboard
Events
Time - Elapsed game time is 0.00 seconds
Conditions
Actions
Leaderboard - Create a leaderboard for (All players) titled Kills
Set Leaderboard = (Last created leaderboard)
For each (Integer A) from 1 to 3, do (If ((Player 1 (Red) slot status) Equal to Is playing) then do (Leaderboard - Add (Player((Integer A))) to Leaderboard with label (Name of (Player((Integer A)))) and value 0) else do (Do nothing))
For each (Integer A) from 4 to 6, do (If (((Player((Integer A))) slot status) Equal to Is playing) then do (Leaderboard - Add (Player((Integer A))) to Leaderboard with label (Name of (Player((Integer A)))) and value 0) else do (Do nothing))
For each (Integer A) from 7 to 9, do (If (((Player((Integer A))) slot status) Equal to Is playing) then do (Leaderboard - Add (Player((Integer A))) to Leaderboard with label (Name of (Player((Integer A)))) and value 0) else do (Do nothing))
For each (Integer A) from 10 to 12, do (If (((Player((Integer A))) slot status) Equal to Is playing) then do (Leaderboard - Add (Player((Integer A))) to Leaderboard with label (Name of (Player((Integer A)))) and value 0) else do (Do nothing))


Could one complete it?


EDIT:

btw: where the hell is this damn search function? I haven't found it yet... emote_confused
08-25-2003, 07:12 PM#2
chemo
this should add the kills to the player that kill the creeps :D


variables:
kills, intenger, array, value: 0


EVENT: Unit - A unit owned by Player 12 (Brown) Dies

CONDITIONS: (Owner of (Triggering unit)) Not equal to (Owner of (Killing unit))


ACTION: Set kills[(Player number of (Owner of (Killing unit)))] = (kills[(Player number of (Owner of (Killing unit)))] + 1)

Leaderboard - Change the value for (Owner of (Killing unit)) in (Last created leaderboard) to kills[(Player number of (Owner of (Killing unit)))]
08-25-2003, 07:18 PM#3
Verjigorm
That's the update trigger... somehow

I need to know how I can add the team kills...
08-25-2003, 07:35 PM#4
chemo
well then u have to make 3 triggers that look like that 1 i made above....

and then say

EVENT: Unit - A unit owned by Player 12 (Brown) Dies

CONDITIONS: (Owner of (Triggering unit)) Not equal to (Owner of (Killing unit))


ACTION: Set kills[(Player number of (Owner of (Killing unit)))] = (kills[(Player number of (Owner of (Killing unit)))] + 1)

Leaderboard - Change the value for (Owner of (Killing unit)) in (Last created leaderboard) to kills[(Player number of (Owner of (Killing unit)))]

If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Or - Any (Conditions) are true
Conditions
Player 1 (Red) Equal to (Owner of (Killing unit))
Player 2 (Blue) Equal to (Owner of (Killing unit))
Player 3 (Teal) Equal to (Owner of (Killing unit))
Then - Actions
Set kills[(Player number of TEAM1))] = (kills[(Player number of TEAM1))] + 1)
Leaderboard - Change the value for (TEAM1) in (Last created leaderboard) to kills[(Player number of TEAM1))]
Else - Actions
Do nothing
08-25-2003, 08:00 PM#5
Verjigorm
thx guy... this should help me... I hope ;)
08-25-2003, 09:42 PM#6
Verjigorm
It didn't help :(
I'm making something wrong I guess, but I don't have the possibility to test this map in LAN or Internet.

I don't see any reason why my triggers should not work. But maybe one of the advanced ones of u may:

Create Leaderboard
Events
Time - Elapsed game time is 0.00 seconds
Conditions
Actions
Leaderboard - Create a leaderboard for (All players) titled Kills
Set Leaderboard = (Last created leaderboard)
Leaderboard - Add Kills_Team[0] to Leaderboard with label Hellish Legion and value 0
For each (Integer A) from 1 to 3, do (If (((Player((Integer A))) slot status) Equal to Is playing) then do (Leaderboard - Add (Player((Integer A))) to Leaderboard with label (Name of (Player((Integer A)))) and value 0) else do (Do nothing))
Leaderboard - Add Kills_Team[1] to Leaderboard with label Guardians of Light and value 0
For each (Integer A) from 4 to 6, do (If (((Player((Integer A))) slot status) Equal to Is playing) then do (Leaderboard - Add (Player((Integer A))) to Leaderboard with label (Name of (Player((Integer A)))) and value 0) else do (Do nothing))
Leaderboard - Add Kills_Team[2] to Leaderboard with label Demonic Horde and value 0
For each (Integer A) from 7 to 9, do (If (((Player((Integer A))) slot status) Equal to Is playing) then do (Leaderboard - Add (Player((Integer A))) to Leaderboard with label (Name of (Player((Integer A)))) and value 0) else do (Do nothing))
Leaderboard - Add Kills_Team[3] to Leaderboard with label Templars of Purity and value 0
For each (Integer A) from 10 to 12, do (If (((Player((Integer A))) slot status) Equal to Is playing) then do (Leaderboard - Add (Player((Integer A))) to Leaderboard with label (Name of (Player((Integer A)))) and value 0) else do (Do nothing))



Update Playerkills
Events
Unit - A unit owned by Player 1 (Red) Dies Matching: (((Triggering unit) is A Hero) Equal to True)
Unit - A unit owned by Player 2 (Blue) Dies Matching: (((Triggering unit) is A Hero) Equal to True)
Unit - A unit owned by Player 3 (Teal) Dies Matching: (((Triggering unit) is A Hero) Equal to True)
Unit - A unit owned by Player 4 (Purple) Dies Matching: (((Triggering unit) is A Hero) Equal to True)
Unit - A unit owned by Player 5 (Yellow) Dies Matching: (((Triggering unit) is A Hero) Equal to True)
Unit - A unit owned by Player 6 (Orange) Dies Matching: (((Triggering unit) is A Hero) Equal to True)
Unit - A unit owned by Player 7 (Green) Dies Matching: (((Triggering unit) is A Hero) Equal to True)
Unit - A unit owned by Player 8 (Pink) Dies Matching: (((Triggering unit) is A Hero) Equal to True)
Unit - A unit owned by Player 9 (Gray) Dies Matching: (((Triggering unit) is A Hero) Equal to True)
Unit - A unit owned by Player 10 (Light Blue) Dies Matching: (((Triggering unit) is A Hero) Equal to True)
Unit - A unit owned by Player 11 (Dark Green) Dies Matching: (((Triggering unit) is A Hero) Equal to True)
Unit - A unit owned by Player 12 (Brown) Dies Matching: (((Triggering unit) is A Hero) Equal to True)
Conditions
(Owner of (Triggering unit)) Not equal to (Owner of (Killing unit))
Actions
For each (Integer A) from 1 to 3, do (If (((Player((Integer A))) slot status) Equal to Is playing) then do (Leaderboard - Change the value for (Player((Integer A))) in Leaderboard to Kills_Player[(Integer A)]) else do (Do nothing))
For each (Integer A) from 4 to 6, do (If (((Player((Integer A))) slot status) Equal to Is playing) then do (Leaderboard - Change the value for (Player((Integer A))) in Leaderboard to Kills_Player[(Integer A)]) else do (Do nothing))
For each (Integer A) from 7 to 9, do (If (((Player((Integer A))) slot status) Equal to Is playing) then do (Leaderboard - Change the value for (Player((Integer A))) in Leaderboard to Kills_Player[(Integer A)]) else do (Do nothing))
For each (Integer A) from 10 to 12, do (If (((Player((Integer A))) slot status) Equal to Is playing) then do (Leaderboard - Change the value for (Player((Integer A))) in Leaderboard to Kills_Player[(Integer A)]) else do (Do nothing))
Leaderboard - Sort Leaderboard by Value in Descending order
Trigger - Run Update Teamkills <gen> (ignoring conditions)





Update Teamkills
Events
Conditions
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Owner of (Killing unit)) Equal to Player 1 (Red)
(Owner of (Killing unit)) Equal to Player 2 (Blue)
(Owner of (Killing unit)) Equal to Player 3 (Teal)
Then - Actions
Set Kills_Team[0] = Kills_Team[((Player number of (Owner of (Killing unit))) + 1)]
Else - Actions
Do nothing
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Owner of (Killing unit)) Equal to Player 4 (Purple)
(Owner of (Killing unit)) Equal to Player 5 (Yellow)
(Owner of (Killing unit)) Equal to Player 6 (Orange)
Then - Actions
Set Kills_Team[1] = Kills_Team[((Player number of (Owner of (Killing unit))) + 1)]
Else - Actions
Do nothing
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Owner of (Killing unit)) Equal to Player 7 (Green)
(Owner of (Killing unit)) Equal to Player 8 (Pink)
(Owner of (Killing unit)) Equal to Player 9 (Gray)
Then - Actions
Set Kills_Team[2] = Kills_Team[((Player number of (Owner of (Killing unit))) + 1)]
Else - Actions
Do nothing
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Owner of (Killing unit)) Equal to Player 10 (Light Blue)
(Owner of (Killing unit)) Equal to Player 11 (Dark Green)
(Owner of (Killing unit)) Equal to Player 12 (Brown)
Then - Actions
Set Kills_Team[3] = Kills_Team[((Player number of (Owner of (Killing unit))) + 1)]
Else - Actions
Do nothing



If this trigger is completly wrong could someone trigger this leaderboard for me?
08-25-2003, 09:46 PM#7
chemo
have u ever tried to set an EVENT at Update TeamKills =?

maybe that would help... but yea... i would make the leaderboard a bit different... but that is just my style..
08-26-2003, 04:55 PM#8
Verjigorm
Now I got a event from time expired = 0.01 seconds

Unfortunately I cannot test the map in BNET or LAN...

No LAN available and hosted games in bnet cannot be joined from others.
(And I allowed the ports used by WIII to be used)

Could u show me the way u would trigger this? I don't want to copy it (and if I want to do, I'll ask for permission and thank u in the finished maps credits :D) just look at it and maybe learn how to trigger as good as possible...
08-26-2003, 05:05 PM#9
chemo
hmmm... i can help u after the 6th september, cause im gonna release a map that day.. and im working hard on it, day and night... but after that, i would be glad to help u...
08-26-2003, 06:39 PM#10
Verjigorm
ok guy... thanks for even this :)

It's a while, maybe I'll find a way to test my map or even get an functioning leaderboard (if the current one really doesn't work)
08-26-2003, 07:14 PM#11
Raptor--
if its not working, i have 2 questions:

A: where is it setting Kills_Player[]?
B: on your Update Team Kills trigger, are the conditions set to 'OR'? because there is no way that the owner of the killing unit will ever be 3 players at once
08-26-2003, 08:29 PM#12
chemo
if its me u are asking... yes i used the OR condition... else it would make no sense...
08-26-2003, 09:18 PM#13
Raptor--
no, i'm not asking you, its written right in what you wrote, OR

i'm asking Verjigorm, since hes the one that started the thread, and its not labelled in his trigger
08-27-2003, 02:55 PM#14
Verjigorm
I corrected this mistake in the trigger... the condition of player comparison is now OR-linked...