So i need a leaderboard to track kills only but at a certain amount of kills for a certain player i need it to do certain events. I cant figure out how any help would be much appreciated!
You just need to create a global Kills array, each index corresponding to a certain player, and then create an event for when that index's values < x. For example, Kills[2] would correspond to Player 3. Create an event for Kills[2] < [some number] and then add the actions for it. I'm not sure how you would combine this all in one event without doing "Kills[0] < x OR Kills[1] < x OR .....", not sure if you can with this system. Best way might just be a separate event for each player's kills.
Open up the Triggers window. On the left pane, right click and do Add New Variable. Name the variable Kills (or whatever you want), and change it to type Integer. Change the variable to an array, and there is a number next to it representing the size of the array. Change that # to the number of players in the game.
You also to need to create a Variable of type Leaderboard. Call it Killboard.
Create a new event saying "If Kills[0] > #". # being the number of kills you want the person to have before something happens. Sorry I had < before not >. Anyways, in that event, you can apply some actions to occur when that event fires. Copy and paste this event for each player, and change Kills[0] to Kills[x], x being the number of the player -1. So for player 3, you would have this event you created and it would check for Kills[2] > #.
As for actually setting up the leaderboard with the players, I can't recall off the top of my head, I would definitely recommend looking for a tutorial on this site or youtube and then posting here again if you still have any questions.
Right now here is what ive been trying to do, iw ont be able to display the leaderboard neways so im just trying to use pure variables. All that happens is whoever reaches the number of kills first gets the trigger for some reason and then it just keeps replaying after every kill.
Kills
Events
Unit - Any Unit dies
Local Variables
Player Unit Type = Zeratul <Game Link - Unit>
Conditions
Actions
General - If (Conditions) then do (Actions) else do (Actions)
If
(Unit type of (Triggering unit)) == Player Unit Type
(Killing unit) == Played Controlled Unit[1]
Then
Variable - Modify Player 1 Kills[0]: + 1
Else
General - If (Conditions) then do (Actions) else do (Actions)
If
(Unit type of (Triggering unit)) == Player Unit Type
(Killing unit) == Played Controlled Unit 2[2]
Then
Variable - Modify Player 2 Kills[0]: + 1
Else
General - If (Conditions) then do (Actions) else do (Actions)
If
(Unit type of (Triggering unit)) == Player Unit Type
(Killing unit) == Played Controlled Unit 3[3]
Then
Variable - Modify Player 3 Kills[0]: + 1
Else
General - If (Conditions) then do (Actions) else do (Actions)
If
(Unit type of (Triggering unit)) == Player Unit Type
(Killing unit) == Played Controlled Unit 4[4]
Then
Variable - Modify Player 4 Kills[0]: + 1
Else
General - If (Conditions) then do (Actions) else do (Actions)
If
(Unit type of (Triggering unit)) == Player Unit Type
(Killing unit) == Played Controlled Unit 5[5]
Then
Variable - Modify Player 5 Kills[0]: + 1
Kills Total = 3
Events
Unit - Any Unit dies
Local Variables
Player Unit Type = Zeratul <Game Link - Unit>
Conditions
Actions
General - If (Conditions) then do (Actions) else do (Actions)
If
(Unit type of (Triggering unit)) == Player Unit Type
Player 1 Kills[0] == 2
Then
UI - Display "PLAYER 1 TEST" for (All players) to Chat area
Else
General - If (Conditions) then do (Actions) else do (Actions)
If
(Unit type of (Triggering unit)) == Player Unit Type
Player 2 Kills[0] == 2
Then
UI - Display "PLAYER 2 TEST" for (All players) to Chat area
Else
General - If (Conditions) then do (Actions) else do (Actions)
If
(Unit type of (Triggering unit)) == Player Unit Type
Player 3 Kills[0] == 2
Then
UI - Display "PLAYER 3 TEST" for (All players) to Chat area
Else
General - If (Conditions) then do (Actions) else do (Actions)
If
(Unit type of (Triggering unit)) == Player Unit Type
Player 4 Kills[0] == 2
Then
UI - Display "PLAYER 4 TEST" for (All players) to Chat area
Else
General - If (Conditions) then do (Actions) else do (Actions)
If
(Unit type of (Triggering unit)) == Player Unit Type
Player 5 Kills[0] == 2
Then
UI - Display "PLAYER 5 TEST" for (All players) to Chat area
Else
Variables
Player 1 Kills = 0 <Integer[1]>
Player 2 Kills = 0 <Integer[1]>
Player 3 Kills = 0 <Integer[1]>
Player 4 Kills = 0 <Integer[1]>
Player 5 Kills = 0 <Integer[1]>
Sorry I passed out. I wish I could reference the editor but unfortunately I don't have it on this computer so I'm just doing this from my head, which was not working very well, which is why I just napped - and yes it would be ==:
To track the kills, make one kills array instead of 5 separate variables:
So i need a leaderboard to track kills only but at a certain amount of kills for a certain player i need it to do certain events. I cant figure out how any help would be much appreciated!
You just need to create a global Kills array, each index corresponding to a certain player, and then create an event for when that index's values < x. For example, Kills[2] would correspond to Player 3. Create an event for Kills[2] < [some number] and then add the actions for it. I'm not sure how you would combine this all in one event without doing "Kills[0] < x OR Kills[1] < x OR .....", not sure if you can with this system. Best way might just be a separate event for each player's kills.
@rymonator: Go
i have no idea whatu just said, i am so bad with this part of the editor :)
@Bounty_98: Go
Open up the Triggers window. On the left pane, right click and do Add New Variable. Name the variable Kills (or whatever you want), and change it to type Integer. Change the variable to an array, and there is a number next to it representing the size of the array. Change that # to the number of players in the game.
You also to need to create a Variable of type Leaderboard. Call it Killboard.
Create a new event saying "If Kills[0] > #". # being the number of kills you want the person to have before something happens. Sorry I had < before not >. Anyways, in that event, you can apply some actions to occur when that event fires. Copy and paste this event for each player, and change Kills[0] to Kills[x], x being the number of the player -1. So for player 3, you would have this event you created and it would check for Kills[2] > #.
As for actually setting up the leaderboard with the players, I can't recall off the top of my head, I would definitely recommend looking for a tutorial on this site or youtube and then posting here again if you still have any questions.
@rymonator: Go
why would u use > for the set number of kills, i thought it would be ==
@Bounty_98
Right now here is what ive been trying to do, iw ont be able to display the leaderboard neways so im just trying to use pure variables. All that happens is whoever reaches the number of kills first gets the trigger for some reason and then it just keeps replaying after every kill.
Kills
Events
Unit - Any Unit dies
Local Variables
Player Unit Type = Zeratul <Game Link - Unit>
Conditions
Actions
General - If (Conditions) then do (Actions) else do (Actions)
If
(Unit type of (Triggering unit)) == Player Unit Type
(Killing unit) == Played Controlled Unit[1]
Then
Variable - Modify Player 1 Kills[0]: + 1
Else
General - If (Conditions) then do (Actions) else do (Actions)
If
(Unit type of (Triggering unit)) == Player Unit Type
(Killing unit) == Played Controlled Unit 2[2]
Then
Variable - Modify Player 2 Kills[0]: + 1
Else
General - If (Conditions) then do (Actions) else do (Actions)
If
(Unit type of (Triggering unit)) == Player Unit Type
(Killing unit) == Played Controlled Unit 3[3]
Then
Variable - Modify Player 3 Kills[0]: + 1
Else
General - If (Conditions) then do (Actions) else do (Actions)
If
(Unit type of (Triggering unit)) == Player Unit Type
(Killing unit) == Played Controlled Unit 4[4]
Then
Variable - Modify Player 4 Kills[0]: + 1
Else
General - If (Conditions) then do (Actions) else do (Actions)
If
(Unit type of (Triggering unit)) == Player Unit Type
(Killing unit) == Played Controlled Unit 5[5]
Then
Variable - Modify Player 5 Kills[0]: + 1
Kills Total = 3
Events
Unit - Any Unit dies
Local Variables
Player Unit Type = Zeratul <Game Link - Unit>
Conditions
Actions
General - If (Conditions) then do (Actions) else do (Actions)
If
(Unit type of (Triggering unit)) == Player Unit Type
Player 1 Kills[0] == 2
Then
UI - Display "PLAYER 1 TEST" for (All players) to Chat area
Else
General - If (Conditions) then do (Actions) else do (Actions)
If
(Unit type of (Triggering unit)) == Player Unit Type
Player 2 Kills[0] == 2
Then
UI - Display "PLAYER 2 TEST" for (All players) to Chat area
Else
General - If (Conditions) then do (Actions) else do (Actions)
If
(Unit type of (Triggering unit)) == Player Unit Type
Player 3 Kills[0] == 2
Then
UI - Display "PLAYER 3 TEST" for (All players) to Chat area
Else
General - If (Conditions) then do (Actions) else do (Actions)
If
(Unit type of (Triggering unit)) == Player Unit Type
Player 4 Kills[0] == 2
Then
UI - Display "PLAYER 4 TEST" for (All players) to Chat area
Else
General - If (Conditions) then do (Actions) else do (Actions)
If
(Unit type of (Triggering unit)) == Player Unit Type
Player 5 Kills[0] == 2
Then
UI - Display "PLAYER 5 TEST" for (All players) to Chat area
Else
Variables
Player 1 Kills = 0 <Integer[1]>
Player 2 Kills = 0 <Integer[1]>
Player 3 Kills = 0 <Integer[1]>
Player 4 Kills = 0 <Integer[1]>
Player 5 Kills = 0 <Integer[1]>
Sorry I passed out. I wish I could reference the editor but unfortunately I don't have it on this computer so I'm just doing this from my head, which was not working very well, which is why I just napped - and yes it would be ==:
To track the kills, make one kills array instead of 5 separate variables:
Sorry, if I was in the right mind before I could have given you a clearer picture, but this should work - let me know if you still have any problems.