Anyone Know how to... -1 reply

Please wait...

Guest

I didn't make it!

0 XP

 
#1 13 years ago

Ok... I'm trying to make a map *duh* and well I'm tryign to have a leaderboard that demonstrates how many kills you got, does anyoen know how to do this? And is there a way that when u get for example 50 kills u receive an item or something?




Muttonus

Meh, whatever

50 XP

30th December 2004

0 Uploads

12 Posts

0 Threads

#2 13 years ago

I'm also wondering how to do a leaderboard, but of items collected for a minigame in an RPG.




anothermember

I don't spend enough time here

50 XP

8th December 2004

0 Uploads

16 Posts

0 Threads

#3 13 years ago

RJK, For your first problem first thing you need to do is make an integer variable array. We will call this variable "kills" just as an example Now two triggers are required to make this: one to make the leaderboard and one to add up all the kills. So it should be something like this. Trigger 1: Events Unit - A unit owned by Player 1 (Red) Dies Unit - A unit owned by Player 2 (Blue) Dies Unit - A unit owned by Player 3 (Teal) Dies Unit - A unit owned by Player 4 (Purple) Dies (etc... for however many players you want) Conditions (Unit-type of (Triggering unit)) Equal to (unit name) (normal) (This is for a specific unit. If you just want all units in general dont bother with this condition) Actions 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)))] Trigger 2: Events Events Time - Elapsed game time is 5.00 seconds (or however long, just dont make it Game Initilization. 1 second is usually good.) Actions Leaderboard - Create a leaderboard for (All players) titled Kills: If ((Player 1 (Red) slot status) Equal to Is playing) then do (Leaderboard - Add Player 1 (Red) to (Last created leaderboard) with label (Name of Player 1 (Red)) and value kills[1]) else do (Do nothing) If ((Player 2 (Blue) slot status) Equal to Is playing) then do (Leaderboard - Add Player 2 (Blue) to (Last created leaderboard) with label (Name of Player 2 (Blue)) and value kills[2]) else do (Do nothing) If ((Player 3 (Teal) slot status) Equal to Is playing) then do (Leaderboard - Add Player 3 (Teal) to (Last created leaderboard) with label (Name of Player 3 (Teal)) and value kills[3]) else do (Do nothing) If ((Player 4 (Purple) slot status) Equal to Is playing) then do (Leaderboard - Add Player 4 (Purple) to (Last created leaderboard) with label (Name of Player 4 (Purple)) and value kills[4]) else do (Do nothing) If ((Player 5 (Yellow) slot status) Equal to Is playing) then do (Leaderboard - Add Player 5 (Yellow) to (Last created leaderboard) with label (Name of Player 5 (Yellow)) and value kills[5]) else do (Do nothing)

...And so on and so forth. This should be fine. If not tell me and i will try to help you. Good Luck!