HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Leaderboard help

08-21-2004, 10:11 PM#1
Xodus-Wing
I'm making a somewhat capture the flag paintball game and I'm not too advanced with triggers yet, this is my first map by myself, but I can't seem to get the leaderboard to work. All I have for it is (not exact words)

event -
Map Initialization


action -
add player 1 to leaderboard with whatever name
add player 2 etc etc etc

can someone please help me.

I want the board to show how many kills each player has, and how many kills total the team has. I also want it so after the first team to reach 260 kills wins.
Thank you so much.
08-21-2004, 10:34 PM#2
Ninja73
Well, ur first problem is: LEADERBOARDS CANT B CREATED AT MAP INITILZATION... make it so time elapsed is .01 seconds, u should always read the little tool tip sorta thing along the bottom of the action. It usally states that stuff cant b done at map start and other useful information.
08-22-2004, 05:17 AM#3
SpadeZ
Yea, its not possible to make a leaderboard on initialization process. But heres basically how you make it.

First you need to make a "leaderboard" variable with no array and no initial value.

Then you make a trigger similar to this:

Note: For the purpose of this example "Killsboard" will be the leaderboard variable.
Code:
    Events
        Time - Elapsed game time is 0.10 seconds
    Conditions
    Actions
        Leaderboard - Create a leaderboard for (All players) titled Kills
        Set KillsBoard = (Last created leaderboard)
        Leaderboard - Add Player 1 (Red) to (Last created leaderboard) with label (Name of Player 1 (Red)) and value 0
        Leaderboard - Add Player 2 (Blue) to (Last created leaderboard) with label (Name of Player 2 (Blue)) and value 0
        Leaderboard - Add Player 3 (Teal) to (Last created leaderboard) with label (Name of Player 3 (Teal)) and value 0
        Leaderboard - Show KillsBoard


GL, .
08-22-2004, 06:32 AM#4
Xodus-Wing
thank you so so much
08-22-2004, 08:47 AM#5
Xodus-Wing
now how do i make it so when a team returns the opponents flag to their own base, it gives their team 5 points.



edit: also I can't find Set (leaderboard name) = (last created leaderboard)
edit again: nvm i got the set leaderboard, but now can someone still tell me how to do the flag points thing
08-22-2004, 10:43 AM#6
SpadeZ
Code:
    Events
        Unit - A unit enters Region 000 <gen>
    Conditions
        Or - Any (Conditions) are true
            Conditions
                (Item-type of (Item carried by (Triggering unit) in slot 1)) Equal to Flag
                (Item-type of (Item carried by (Triggering unit) in slot 2)) Equal to Flag
                (Item-type of (Item carried by (Triggering unit) in slot 3)) Equal to Flag
                (Item-type of (Item carried by (Triggering unit) in slot 4)) Equal to Flag
                (Item-type of (Item carried by (Triggering unit) in slot 5)) Equal to Flag
                (Item-type of (Item carried by (Triggering unit) in slot 6)) Equal to Flag
    Actions
                (Here you can set the values in the leaderboard or anything you want)

GL, .
08-22-2004, 12:56 PM#7
Xodus-Wing
thanks again, and how do i make it so if a unit is running with the flag back to base, and he gets killed, how do i make it so the flag goes back to the base which he stole it from? ^_^


nvm, im so stupid... i got it
08-22-2004, 01:39 PM#8
Xodus-Wing
ok, heres wut i want to happen...

team 1 steals team 2's flag, they bring it back to their flag and walk into the region where they are supposed to drop the flag to get points. They enter the region, 5 points are added to the teams score. The player walks out of the region and the flag leaves their inventory and the flag is generated at the enemys base again.

Heres what happens

It all works right but even if you enter the region to drop off the flag but don't have a flag, and leave the region, a flag is generated at the enemy base. Meaning they have more than 1 flag now...

here are the triggers I have

Code:
Events-
Unit - A unit leaves Team 1 Flag <gen>

Conditions - 

Actions -
Item - Remove Malus Flag 0000 <gen>
Item - Create Malus Flag at (Center of Team 2 Flag <gen>)

and for when a unit dies when he is carrying the flag, I have

Code:
Events-
Unit - a unit Dies

Conditions -

Actions - 
Item - Make (Item carried by (Triggering unit) of type Malus Flag) Drop from Heros upon Death
Item - Create Malus Flag at (Center of Team 2 Flag <gen>)
08-23-2004, 12:49 AM#9
Xodus-Wing
bumplestiltskin
08-23-2004, 12:59 PM#10
Xodus-Wing
cmon guys