• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

I can't remove a player automatically from a leaderboard

Status
Not open for further replies.
Level 4
Joined
Jun 23, 2016
Messages
64
Hi, I managed to remove a player from the leaderboard1 and add it to the leaderboard2, making it disappear from leaderboard1 automatically. However, when I try to put the player back to leaderboard1, it doesn't disappear automatically from leaderboard2. I have to show up the leaderboard2 again (I press a unit to make it appear) to make the player disappear, something that isn't necessary with leaderboard1.

When I press a button from a dialog, the player is removed from one leaderboard and added to another one. Since you can't have two leaderboards at the same time, there's a trigger that tries to remove the player from one and add it to another every 0.10 seconds.


When I press the button to remove the player from board1:
  • Buton Pressed
    • Events
    • Conditions
    • Actions
  • Set ButtonPressed= (ButtonPressed+ 1)
I have the game in spanish, so some icons won't appear.
  • Checking if the button that i want has been pressed
    • Events
  • Time - Every 0.10 seconds of game time
    • Conditions
  • ButtonPressed equal to 1
    • Actions
  • Leaderboard - Remove Player from Leaderboard1
  • Leaderboard - Add Player to Leaderboard2
If the leaderboard1 is visible, I see that the player disappearing from it. Then, when I select leaderboard2, I see the player there. Well, until now is working, the problem comes when I want to put the player back to leaderboard1. Although it follows the same structure, the player isn't removed automatically; as I said I have to show up the leaderboard2 again to see if it has disappeared.


  • Button to remove the player from leaderboard2 pressed
    • Events
    • Conditions
    • Actions
  • Set ButtonPressed= (ButtonPressed- 1)
  • Checking if the button that i want has been pressed
    • Events
  • Time - Every 0.10 seconds of game time
    • Conditions
  • ButtonPressed equal to 0
    • Actions
  • Leaderboard - Remove Player from Leaderboard2
  • Leaderboard - Add Player to Leaderboard1
Sorry for my english. This issue is quite complicated.

Thanks in advance
 
Level 4
Joined
Nov 26, 2013
Messages
23
This is missing a whole lot of information needed to help you. From the structure of the triggers you posted here I'm surprised it works at all.

What I would check first is your Variable type. "ButtonPressed" seems to be an Integer variable, as you add 1 and subtract 1. Use a Boolean for this, as this only has "True" and "False" statements.
But that probably wont fix the problem.

But to really help you I have to ask you, why do you have the system set up like this, what is it for?
 
Level 4
Joined
Jun 23, 2016
Messages
64
This is missing a whole lot of information needed to help you. From the structure of the triggers you posted here I'm surprised it works at all.

What I would check first is your Variable type. "ButtonPressed" seems to be an Integer variable, as you add 1 and subtract 1. Use a Boolean for this, as this only has "True" and "False" statements.
But that probably wont fix the problem.

But to really help you I have to ask you, why do you have the system set up like this, what is it for?
I've solved the problem. I was writing the answer, checking every trigger, and then I realized that I had put the wrong player to be removed. Since the label on the leaderboard is the same, I didn't know that it wasn't the right player. Holy shit, such an stupid mistake

Thank you anyway
 
Status
Not open for further replies.
Top