Cannot finish leaderboard trigger

vegeta020

New Member
Reaction score
0
Here is the thing... I am relatively new in this whole thing with map editing, but i am learning this for a pretty long time, and everything i learned i learned by myself... But yesterday i found myself in dead end, because i didn't knew how to make leaderboard work... i went on d3 scene and found the answer on my problem... But i dont understand one thing:

I've created a leaderboard and variable Player_Kills because i want to keep track of kills... i've made it array variable, because it was the instruction...
Then i followed the instructions... i've made the new trigger named "Trigger Tally Score" and done these steps:


Events
Unit - A unit Dies
Conditions
((Killing unit) belongs to an ally of Player 1 (Red)) Equal to True
Actions
Set Player_Kills[(Player number of (Owner of (Killing unit)))] = (Player_Kills[(Player number of (Owner of (Killing unit)))] + 1)


Leaderboard - Change the value for (Owner of (Killing unit)) in (Last created leaderboard) to Player_Kills[(Player number of (Owner of (Killing unit)))]

Leaderboard - Sort (Last created leaderboard) by Value in Descending order



Now the problem is in that i cannot set bolded part as variable Player_Kills... Editor just says that there is no variable that fits the requests... Really dont understand, and i need help, because leaderboard gives sense to my mod...
 

Pharaoh_

The epic journey will soon begin... Prepare!
Reaction score
136
Well, what type your variable is? It has to be Integer and then make a simple conversion to string -if required-.
 

vegeta020

New Member
Reaction score
0
Honestly i dunno what kind of variable i had to make... I tried with leaderboard type, because i thought it was logic, and after i didnt dare to change it, because it would reset all of my work i have done before... :(
 

Pharaoh_

The epic journey will soon begin... Prepare!
Reaction score
136
I just told you what type to make it: "Integer". Or do this:

Trigger:
  • Trigger
    • Events
      • A unit dies
    • Conditions
      • ((Killing unit) belongs to an ally of Player 1 (Red)) Equal to True
    • Actions
      • Unit - Set the custom value of (Killing unit) to ((Custom value) of (Killing unit) + (1))
      • Leaderboard - Change the value for (Owner of (Killing unit)) to (Custom value of (Killing unit))


This will also work (100%).
 

vegeta020

New Member
Reaction score
0
Thank you very much... Finally i figured that out... Just have to fix one thing... The leaderboard counts, but there is no names... I think that it will be easy thing to do :D
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top