F
forsaken240
Guest
I'm trying to make a King of the Hill style game so when the players enter the region, and for every second they're inside the region, the player gains 100 points. If anyone could help I'd be extremely grateful. I'm not sure if the problem is in my leaderboard not counting the points, or the players not recieving any points at all. Here's what I have so far.
Leaderboard
Events
Time - Elapsed game time is 5.00 seconds
Conditions
(None)
Actions
Leaderboard - Create a leaderboard for (All players) titled (King Of The Hill Scores)
Custom script: set bj_wantDestroyGroup=true
Player Group - Pick every player in (All players) and do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Picked player) controller) Equal to User
((Picked player) slot status) Equal to Is playing
Then - Actions
Leaderboard - Add (Picked player) to (Last created leaderboard)
with label (Name of (Picked player)) and value 0
Else - Actions
Do nothing
Leaderboard - Show (Last created leaderboard)
Trigger Tally Score
Events
Unit - A unit enters region Hill <gen>
Conditions
((Triggering unit) is an Ancient) Equal to True
Actions
Set ScoreArray[(Player number of (Owner of (picked unit)))] =
(ScoreArray[(Player number of (Owner of (Picked unit)))] + 100)
Leaderboard - Change the value for (Owner of (Picked unit)) in
(Last created leaderboard) to ScoreArray[(Player number of (Owner of (Picked unit)))]
Leaderboard - Sort (Last created leaderboard) by Value in Descending order
Leaderboard
Events
Time - Elapsed game time is 5.00 seconds
Conditions
(None)
Actions
Leaderboard - Create a leaderboard for (All players) titled (King Of The Hill Scores)
Custom script: set bj_wantDestroyGroup=true
Player Group - Pick every player in (All players) and do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Picked player) controller) Equal to User
((Picked player) slot status) Equal to Is playing
Then - Actions
Leaderboard - Add (Picked player) to (Last created leaderboard)
with label (Name of (Picked player)) and value 0
Else - Actions
Do nothing
Leaderboard - Show (Last created leaderboard)
Trigger Tally Score
Events
Unit - A unit enters region Hill <gen>
Conditions
((Triggering unit) is an Ancient) Equal to True
Actions
Set ScoreArray[(Player number of (Owner of (picked unit)))] =
(ScoreArray[(Player number of (Owner of (Picked unit)))] + 100)
Leaderboard - Change the value for (Owner of (Picked unit)) in
(Last created leaderboard) to ScoreArray[(Player number of (Owner of (Picked unit)))]
Leaderboard - Sort (Last created leaderboard) by Value in Descending order


