Hero level leaderboard - Is this possible?

  • Thread starter Thread starter Xiaolin
  • Start date Start date
X

Xiaolin

Guest
I'm trying to make a leaderboard that displays the level of the hero. I think I can probably do it for 1 hero per player looking at the code but I'm having difficulty figureing something out for 2 heros per player. Is this possible?
essentially I want the leaderbaord to show the level of each hero playing the game and allow upto 2 heros per player.
If this is possible could I then use the same variables to prevent the player with the highest level hero from purchasing cetrain items? i.e tome of power?
Sorry for not having a specific code I'm trying at present but I don't want to waste my time trying to figure it out if it isn't possible. Oh yeah if it's not possible, is it possible for the 1 hero per player leaderboard?
 
You should. And it's not "waste

To true. Bad choice of words.. I still have a lot to do to get everything right in my map and I didn't want to end up chasing a dead end if I could work on something else instead.
 
well..

I can get the players in the board (but only 1 at the moment.) but the values aren't going up with the trigger I'm using.

leveling up
Events
Unit - A unit Gains a level
Conditions
Actions
If ((Owner of (Leveling Hero)) Equal to Player 1 (Red)) then do (Set Hero1 = (Hero1 + 1)) else do (Do nothing)
If ((Owner of (Leveling Hero)) Equal to Player 2 (Blue)) then do (Set Hero2 = (Hero2 + 1)) else do (Do nothing)
If ((Owner of (Leveling Hero)) Equal to Player 3 (Teal)) then do (Set Hero3 = (Hero3 + 1)) else do (Do nothing)
If ((Owner of (Leveling Hero)) Equal to Player 4 (Purple)) then do (Set Hero4 = (Hero4 + 1)) else do (Do nothing)
If ((Owner of (Leveling Hero)) Equal to Player 5 (Yellow)) then do (Set Hero5 = (Hero5 + 1)) else do (Do nothing)
If ((Owner of (Leveling Hero)) Equal to Player 6 (Orange)) then do (Set Hero6 = (Hero6 + 1)) else do (Do nothing)



Does anone know what I'm doing wrong here?

also when I get a second hero for player 1 instead of adding a 2nd hero to the list it just wipes over the 1st hero. (it's not possible to get a 2nd hero at level 1)
Any ideas here either?



Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Owner of (Leaving unit)) Equal to Player 1 (Red)
((Leaving unit) is A Hero) Equal to True
Hero1 Less than 1
Then - Actions
Leaderboard - Add Player 1 (Red) to (Last created leaderboard) with label (Proper name of (Leaving unit)) and value Hero1
Else - Actions
Do nothing



If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Owner of (Leaving unit)) Equal to Player 1 (Red)
((Leaving unit) is A Hero) Equal to True
Hero1 Greater than 1
Then - Actions
Leaderboard - Add Player 1 (Red) to (Last created leaderboard) with label (Proper name of (Leaving unit)) and value Heroa
Else - Actions
Do nothing
 
> If ((Owner of (Leveling Hero)) Equal to Player 1 (Red)) then do (Set Hero1 = (Hero1 + 1)) else do (Do nothing)

This is not enough.
You also must put the new value into the leaderboard.


On a related note, one variable for two Heroes is not enough either.
However, do you actually need those variables?
Because you could simply use "Hero - level of Hero", without a need to store it somewhere.
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • The Helper The Helper:
    Wow - the change in the stats are major. I kind of knew it was all bots but wow, to see the effect. Why the social media sites cant do something like this I have no idea.
  • Ghan Ghan:
    Probably inflates their numbers so they look better to advertisers.
  • The Helper The Helper:
    Yeah google does not filter those bots. I remember when Apex was doing Google ads I saw the same IPs in there as I was seeing here - google is totally tracking all those bots as traffic and most google traffic, at least ours, was all bots
  • The Helper The Helper:
    oh wow, i bet i can post x links now and do the webp pics now giggity
  • The Helper The Helper:
    ahh anubis blocks anyone that has javascript turned off
  • The Helper The Helper:
    Robot: HTTP client library - i love the new robot :)
  • The Helper The Helper:
    New Science News Forum and it starts out with 420 threads :)
  • The Helper The Helper:
    Technical Support forum name changed To Technology News, there is now a Tech, sci/tech and science forums now :)
  • The Helper The Helper:
    Happy Saturday! Hope everyone has a fantastic weekend!
  • Ghan Ghan:
    We are now on Ubuntu 24.04. Had some issues with the style after the OS/PHP upgrade but now resolved.
    +1
  • Ghan Ghan:
    PHP 8.3 now live
    +1
  • The Helper The Helper:
    Weekend went by too fast. Next weekend I am going to try to do a nature thing - buddy of mine lives by the Colorado river and has some kayaks and invited me to do some kayaking from a place he knows to get on the river.
  • Ghan Ghan:
    That sounds like an adventure.
  • The Helper The Helper:
    400 users all online all looking at latest content
  • The Helper The Helper:
    I wonder how all these bots that sit on the lastest content page get passed anubis or maybe they did not but they are just registering on whos online
  • The Helper The Helper:
    showing up on whos online not registration
  • Ghan Ghan:
    The first gate is stopping all the bots that don't execute javascript.
  • Ghan Ghan:
    That's the main thing with Anubis - no Javascript, no site. Typically you can still get the site to load without Javascript.
  • The Helper The Helper:
    I remember the whole javascript thing, question - how many real people disable that?
  • The Helper The Helper:
    Hell I guess I could go back on the stats to know that - we probably capture that and we know the before and after
  • Ghan Ghan:
    Real users can't really disable Javascript anymore these days.
  • Ghan Ghan:
    The internet is broken without it.
  • Ghan Ghan:
    Bot readable, not human usable.
  • The Helper The Helper:
    got it
  • The Helper The Helper:
    Happy Thursday!

The Helper Discord

Staff online

  • Ghan
    Administrator - Servers are fun

Members online

Affiliates

Hive Workshop NUON Dome World Editor Tutorials
Back
Top