HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

My Leader Board

03-14-2006, 05:01 PM#1
RDX2
OK my Leader Looks ok But I need Help here is the code, they lives instead of going down from 100 then go to -1 and then do down and for that ---------- 0 i cant get ride of the zero

Trigger:
LeaderBoard
Collapse Events
Time - Elapsed game time is 0.01 seconds
Conditions
Collapse Actions
Leaderboard - Create a leaderboard for (All players) titled DRX Team Survival
Leaderboard - Show (Last created leaderboard)
Collapse Player Group - Pick every player in (All allies of Player 1 (Red)) and do (Actions)
Collapse Loop - Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
((Picked player) controller) Equal to User
((Picked player) slot status) Equal to Is playing
Collapse Then - Actions
Leaderboard - Add Player 12 (Brown) to (Last created leaderboard) with label West Lives and value 100
Leaderboard - Add (Picked player) to (Last created leaderboard) with label ( + (Name of (Picked player))) and value Kill_count[(Player number of (Picked player))]
Collapse Else - Actions
Leaderboard - Add Neutral Hostile to (Last created leaderboard) with label -------------------... and value 0
Collapse Player Group - Pick every player in (All allies of Player 7 (Green)) and do (Actions)
Collapse Loop - Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
((Picked player) slot status) Equal to Is playing
((Picked player) controller) Equal to User
Collapse Then - Actions
Leaderboard - Add Player 6 (Orange) to (Last created leaderboard) with label East Lives and value 100
Leaderboard - Add (Picked player) to (Last created leaderboard) with label ((String((Player number of (Picked player)))) + (Name of (Picked player))) and value Kill_count[(Player number of (Picked player))]
Else - Actions
Thats The Leader Board and here is the lives

Trigger:
Lives West
Collapse Events
Unit - A unit enters Region 001 <gen>
Collapse Conditions
(Owner of (Entering unit)) Equal to Player 12 (Brown)
Collapse Actions
Unit - Kill (Entering unit)
Set Lives[(Player number of Player 12 (Brown))] = (Lives[(Player number of Player 12 (Brown))] - 1)
Leaderboard - Change the value for Player 12 (Brown) in (Last created leaderboard) to Lives[(Player number of Player 12 (Brown))]
03-14-2006, 05:09 PM#2
Captain Griffen
Well, the first trigger seems a bit random. Why is the allies of player 7 under the else?

Should the lives (second trigger) only be affecting player 12?
03-14-2006, 05:21 PM#3
RDX2
Because player 6 and 12 are creeps, and player 7 and 1 are the allies
its 5v5
03-14-2006, 05:51 PM#4
Thunder_Eye
You can change the
[(Player number of Player 12 (Brown))]
to [12] as it's the same thing.
03-14-2006, 08:46 PM#5
RDX2
All I WAnt It To Do Is Go Down From 100 and say a text u Lost u like u Have # Remaining
03-14-2006, 08:57 PM#6
Eternal_Dread
Alright, just go to the games section of triggers, then select the Text Message (Auto-timed) trigger. Example:
Trigger:
Game - Display to Player Group - Player 1 (Red) the text: (You have + ((insert variable here) + lives remaining.))
03-14-2006, 09:01 PM#7
Captain Griffen
You don't set the lives array to 100 at the begining, so it is 0.
03-14-2006, 09:08 PM#8
Eternal_Dread
Make a trigger for map initialization, and then put this in it:
Trigger:
Set (lives variable) to 100
I find that easier for some people to understand.
03-14-2006, 09:50 PM#9
RDX2
ok thx il try it
03-14-2006, 10:14 PM#10
RDX2
Now I Cant Get Ride Of That 0 Buy The ------------------- 0
looks like that
03-14-2006, 10:43 PM#11
Eternal_Dread
Change to a multiboard, it doesn't require a value, but you can still put in the lives.