Leaderboard problem

sergykid

Cool Member
Reaction score
0
i created a leaderboard with the elapsed 1 game second (as event, so not map init) added players value anything correct. But the score doesnt update. This is my trigger: points
Events
Unit - A unit Dies
Conditions
((Killing unit) is A Hero) Equal to True
((Dying unit) is A Hero) Equal to True
Actions
Set P_Points[(Player number of (Owner of (Killing unit)))] = P_Points[(P_Points[(Player number of (Owner of (Killing unit)))] + 1)]
Leaderboard - Change the value for (Owner of (Killing unit)) in Board to P_Points[(Player number of (Owner of (Killing unit)))]
Set P_Points[(Player number of (Owner of (Dying unit)))] = P_Points[(P_Points[(Player number of (Owner of (Dying unit)))] - 1)]
Leaderboard - Change the value for (Owner of (Dying unit)) in Board to P_Points[(Player number of (Owner of (Dying unit)))]
Leaderboard - Sort Board by Value in Descending order

the score doesnt update and it is correct no ? i disable the "-1" trigger and not worked. i changed the original value of the integer variable P_Points from 0(default) to 10, and when a hero dies it goes to 0 instantly to all players :confused:

EDIT: "board=the leaderboard", "P_Points=integer value of the board"
 

WolfieeifloW

WEHZ Helper
Reaction score
372
Go into the World Editor.
Right-click on the "points" text (Your trigger).
Click "Copy as text".
Come back to the forums here, and paste the code between [noparse]
Trigger:
[/noparse] tags.
 

sergykid

Cool Member
Reaction score
0
Trigger:
  • points
    • Events
    • Unit - A unit Dies
    • Conditions
    • ((Killing unit) is A Hero) Equal to True
    • ((Dying unit) is A Hero) Equal to True
    • Actions
    • Set P_Points[(Player number of (Owner of (Killing unit)))] = P_Points[(P_Points[(Player number of (Owner of (Killing unit)))] + 1)]
    • Leaderboard - Change the value for (Owner of (Killing unit)) in Board to P_Points[(Player number of (Owner of (Killing unit)))]
    • Set P_Points[(Player number of (Owner of (Dying unit)))] = P_Points[(P_Points[(Player number of (Owner of (Dying unit)))] - 1)]
    • Leaderboard - Change the value for (Owner of (Dying unit)) in Board to P_Points[(Player number of (Owner of (Dying unit)))]
    • Leaderboard - Sort Board by Value in Descending order
 

Magthridon96

Member
Reaction score
2
Here:

Trigger:
  • Trigger
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Killing unit) is A Hero) Equal to True
      • ((Dying unit) is A Hero) Equal to True
    • Actions
      • Set P_Points[(Player number of (Owner of (Killing unit)))] = (P_Points[(Player number of (Owner of (Killing unit)))] + 1)
      • Leaderboard - Change the value for (Owner of (Killing unit)) in Board to P_Points[(Player number of (Owner of (Killing unit)))]
      • Set P_Points[(Player number of (Owner of (Dying unit)))] = (P_Points[(Player number of (Owner of (Dying unit)))] - 1)
      • Leaderboard - Change the value for (Owner of (Dying unit)) in Board to P_Points[(Player number of (Owner of (Dying unit)))]
      • Leaderboard - Sort Board by Value in Descending order


The problem was that your arrangement was incorrect. If Player 1 had 3 points, you'd be updating his score to player 4's score :p
 

sergykid

Cool Member
Reaction score
0
aaaaa yea thats it! man thanks you have a hawk eye ;)

but anyway why my board was changing the values to 0 to all players when any unit was dying?...
 
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