Leaderboard

Classe

New Member
Reaction score
1
Classe, new thehelper / Leaderboard question


Hellu everyone!

This is Classe for the first time on thehelper.net........
I'm looking for help about Warcraft III World Editor and i think this is a great place to ask.

I hope to be coming with countless questions regarding triggers, variables, and other programming in general.

So c ya around.! :)




Question!:D

I also would like to ask a question about a leaderboard i'm trying to establish right now... it doesn't work at all :p
It's supposed to count kills. (i'm starting out easy)
But it doesn't count at all but i can see the leaderboard with my namn and a 0 value.

Trigger for setting up leaderboard

Leaderboard
Events
Time - Elapsed game time is 3.00 seconds
Conditions
Actions
Leaderboard - Create a leaderboard for (All players) titled Killzzz
Player Group - Pick every player in (All players) and do (If (((Picked player) controller) Equal to User) then do (Leaderboard - Add (Picked player) to (Last created leaderboard) with label (Name of (Picked player)) and value 0) else do (Do nothing))
Leaderboard - Show (Last created leaderboard)


Trigger for tallying

Kilzzz
Events
Unit - A unit Dies
Conditions
((Dying unit) belongs to an enemy of Player 1 (Red)) Equal to True
Actions
Set Killzzz[(Player number of (Owner of (Killing unit)))] = Killzzz[(Killzzz[(Player number of (Owner of (Killing unit)))] + 1)]
Leaderboard - Change the value for (Owner of (Killing unit)) in (Last created leaderboard) to Killzzz[(Player number of (Owner of (Killing unit)))]
Leaderboard - Sort (Last created leaderboard) by Value in Descending order
 
In the second trigger, replace (last created leaderboard) with a variable.
The type is obviously leaderboard :p

In first trigger:
Code:
 Leaderboard- Create a leaderboard for (All players) titled Killz
[B]set yourLeaderboard = last created leaderboard[/B]
Player Group - Pick every player in (All players) and do (If (((Picked player) controller) Equal to User) then do (Leaderboard - Add (Picked player) to [B]yourLeaderboard[/B] with label (Name of (Picked player)) and value [U]Killz[(player number of (owner of (killing unit))][/U] else do (Do nothing))
Leaderboard - Show [B]yourLeaderboard[/B]

Bold is changed things.
Underlined is really really important. If it's value is 0 it will be 0 until you manually change it.
 
Wow....

I haven't tried yet but i fully trust your advice and i'm launching WE right now...

I just want to say omg that's a really creeping fast reply. Love the forum already. :thup:

Thanks! and hope to see you again:D
 
hM hM...

Nevermind my replys...

I solved the problem by analysing the triggers by eye.
The solutions that Emu.man00 suggested helped my leaderboard come out of the hangar and by solving a incorrect trigger i got it flying. Works great now.

I decided to put the complete triggers here on the forum so people can use it to make tons of more completly awesome maps that count the casualties of warcraft players inhuman onslaughts.

Trigger for making the leaderboard:

Leaderboard

Events

Time - Elapsed game time is 1.00 seconds

Conditions

Actions
Leaderboard - Create a leaderboard for (All players) titled Killzzz

Set killzleaderboard = (Last created leaderboard)

Player Group - Pick every player in (All players) and do (If (((Picked player) controller) Equal to User) then do (Leaderboard - Add (Picked player) to killzleaderboard with label (Name of (Picked player)) and value Killzzz[(Player number of (Owner of (Killing unit)))]) else do (Do nothing))

Leaderboard - Show (Last created leaderboard)

Trigger for tallying:

Kilzzz

Events

Unit - A unit Dies

Conditions

((Killing unit) belongs to an ally of Player 1 (Red)) Equal to True

Actions

Set Killzzz[(Player number of (Owner of (Killing unit)))] = (Killzzz[(Player number of (Owner of (Killing unit)))] + 1)

Leaderboard - Change the value for (Owner of (Killing unit)) in killzleaderboard to Killzzz[(Player number of (Owner of (Killing unit)))]

Leaderboard - Sort killzleaderboard by Value in Descending order



*Note, count kills from both enemy and friendlys
 
> Set Killzzz[(Player number of (Owner of (Killing unit)))] = Killzzz[(Killzzz[(Player number of (Owner of (Killing unit)))] + 1)]

Set Killzzz[(Player number of (Owner of (Killing unit)))] = (Killzzz[(Player number of (Owner of (Killing unit)))] + 1)
 
maybe change condition if ur enemy is player brown set

Code:
(Owner of (Triggering unit)) Equal to Player 12 (Brown)
 
thank you

Thansk for all help guys. I got it working before i saw the last 2 post but i appreciate everything.
acehart posted what i had done wrong you can see i had made a double arithmetic....
and about the condition... it can be very much... the best should problably be something like:

Code:
((Dying unit) belongs to an enemy of (Owner of (Killing unit))) Equal to True
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • The Helper The Helper:
    News portal has been retired. Main page of site goes to Headline News forum now
  • The Helper The Helper:
    I am working on getting access to the old news portal under a different URL for those that would rather use that for news before we get a different news view.
  • Ghan Ghan:
    Easily done
    +1
  • The Helper The Helper:
    https://www.thehelper.net/pages/news/ is a link to the old news portal - i will integrate it into the interface somewhere when i figure it out
  • Ghan Ghan:
    Need to try something
  • Ghan Ghan:
    Hopefully this won't cause problems.
  • Ghan Ghan:
    Hmm
  • Ghan Ghan:
    I have converted the Headline News forum to an Article type forum. It will now show the top 20 threads with more detail of each thread.
  • Ghan Ghan:
    See how we like that.
  • The Helper The Helper:
    I do not see a way to go past the 1st page of posts on the forum though
  • The Helper The Helper:
    It is OK though for the main page to open up on the forum in the view it was before. As long as the portal has its own URL so it can be viewed that way I do want to try it as a regular forum view for a while
  • Ghan Ghan:
    Yeah I'm not sure what the deal is with the pagination.
  • Ghan Ghan:
    It SHOULD be there so I think it might just be an artifact of having an older style.
  • Ghan Ghan:
    I switched it to a "Standard" article forum. This will show the thread list like normal, but the threads themselves will have the first post set up above the rest of the "comments"
  • The Helper The Helper:
    I don't really get that article forum but I think it is because I have never really seen it used on a multi post thread
  • Ghan Ghan:
    RpNation makes more use of it right now as an example: https://www.rpnation.com/news/
  • The Helper The Helper:
  • The Helper The Helper:
    What do you think Tom?
  • tom_mai78101 tom_mai78101:
    I will have to get used to this.
  • tom_mai78101 tom_mai78101:
    The latest news feed looks good
  • The Helper The Helper:
    I would like to see it again like Ghan had it the first time with pagination though - without the pagination that view will not work but with pagination it just might...
  • The Helper The Helper:
    This drink recipe I have had more than a few times back in the day! Mind Eraser https://www.thehelper.net/threads/cocktail-mind-eraser.194720/

      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