Need Help with Leaderboard

U

Unregistered

Guest
So im not an expert with the world editor yet, but I'm getting better. Anyway, Darg you helped my out with a trigger problem ealier, maybe you can help with my leader board problem, it may be complex, but maybe you can still help.

So here's the premise and want i'd like to do. The map i made is an 8 player 2v2v2v2. Players 1-8 are human players, and 11 is the computer. The computer spawns monsters that attack every 5 minutes. I want to create a leader board that has the four teams and keeps track of how many player 11 kills each team has.

At the end of the spawning (last round is over) id like to have the team with highest points win.

If you could help that would be great and i would appreciate it much. Thanks in advance.
 

Darg

Administrator
Reaction score
49
you need to make an integer kill array which keeps track of your kills. this array will be using 8 slots, one for each player.

ok so you set up the leaderboard and add 4 players to it (any 4 players), and give those players the values of the 2 allys in each team e.g.

player 1 value = (kills[1] + kills[2])
player 2 value = (kills[3] + kills[4])
.......

so:

event:
a unit owner by player 11 dies

action:
set kills[player number of owner of killing unit] = set kills[player number of owner of killing unit] + 1

then you need to change the value of the leaderboard everytime this happens too:

leaderboard - change value for player 1 to (kills[1] + kill[2])
........



when your game is over, now you need to find the team with the most kills. this isn't trivial when i think about it, you have to use the integer comparison 'math - max' (or something like that), which will tell you which of 2 values are higher (so you compare 2 kill values). just compare all the values till you find the highest one.
 
N

Necropolis

Guest
a different leaderboard

...why not post here.


this is simple, i want to make it so that when you type a certain thing, leaderboard count goes up ( i know this sounds really stupid )

basically...for example, you put down "lift weights" and then in the leaderboard it will go up by 1. you type it again, it goes to 2...
 

Darg

Administrator
Reaction score
49
um, leaderboards can have multiple entries each with a value. How many entries does your board have?

Assuming it just has 1, u need to keep track of the value of it using a variable. Call it say 'variable' or something. Make it an integer variable.

so:

event: [chat message]
player types "lift weights" as an exact string

action:
set variable = variable + 1
change value of <player 1> in <last created leaderboard> to <variable>

that action assumes that that value you put into the leaderboard is for <player 1>. Remember that you have to specify a player when entering a value in the board. In reality this doesn't mean anything because you can put any value in, and it is very misleading to people who are new to the editor.
 
N

Necropolis

Guest
woo

finally found out...thanks, basically, i am making a game where you can train your stats and battle other people.

Player 1 Position- Life
Player 2 Position- Strength
Player 3 Position- Defense
Player 4 Position- Intelligence
Player 5 Position- Accuracy
Player 6 Position- Speed

You type in "Punching Bag" and your strength increases by 1. Type "Target practice" and your accuracy increases. Get it?

For life, it goes like this.

Event- Player 1 enters a chat message "Swimming Lap" as an Exact Match.

Condition- None

Action- Set Integer Array[1]= (IntegerArray[1]=1)
Run Swimming Lap Add, ignoring conditions

and in swimming lap add it changes value
 
S

Smartguy

Guest
anyway...so i'm still making the map, and i also put in another player ( 8, green ) that represents the weight of your player...( i know this game sounds stupid but it is really fun so far )


anyway, you can eat chicken, which does: SetIntegerArray[10]=(IntegerArray[10]+1)

it adds 1 weight, so the leaderboard goes:

Status:
WEIGHT: 1

then, you can eat a thing called a diet pill, which reduces it by 1...
SetIntegerArray[11]=(IntegerArray[11]+-1)

Status:
WEIGHT: 0

However, instead it simply makes the weight -1 instead of subtracting 1, which makes it zero....right?

So it does this:

Status/Weight: -1

then i eat another chicken bone, and it should go back up to 1 from 0, but it brings me to 2.... they're basically in 2 different worlds

anyway, i'm gonna go listen to some starcraft music now....sounds like rock lol
 
M

mr. poon

Guest
two that i know...
BACKINTIME- Starcraft Theme Music
GROBAN- Weird music

anyway, starcraft theme music isn't that bad...but kind of crabby, it doesn't work well...and most of the time it never works when i type it! but it sounds cool anyway....
 

Darg

Administrator
Reaction score
49
Um, are there any new questions being asked in this thread that I haven't answered yet? I actually can't tell anymore, cause there's so much stuff in here.....

Let me just say that I have NEVER gotten 'BACKINTIME' to work. And I don't understand HOW it would work either, since I am yet to find ANY starcraft music on the war3 cd, or in the war3 directory on the hdd.

I challenge anyone who gets the music playing to record it and post it up here in mp3 format. And tell us EXACTLY under what conditions this cheat will and will not work.
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • Ghan Ghan:
    Howdy
  • Ghan Ghan:
    Still lurking
    +3
  • The Helper The Helper:
    I am great and it is fantastic to see you my friend!
    +1
  • The Helper The Helper:
    If you are new to the site please check out the Recipe and Food Forum https://www.thehelper.net/forums/recipes-and-food.220/
  • Monovertex Monovertex:
    How come you're so into recipes lately? Never saw this much interest in this topic in the old days of TH.net
  • Monovertex Monovertex:
    Hmm, how do I change my signature?
  • tom_mai78101 tom_mai78101:
    Signatures can be edit in your account profile. As for the old stuffs, I'm thinking it's because Blizzard is now under Microsoft, and because of Microsoft Xbox going the way it is, it's dreadful.
  • The Helper The Helper:
    I am not big on the recipes I am just promoting them - I use the site as a practice place promoting stuff
    +2
  • Monovertex Monovertex:
    @tom_mai78101 I must be blind. If I go on my profile I don't see any area to edit the signature; If I go to account details (settings) I don't see any signature area either.
  • The Helper The Helper:
    You can get there if you click the bell icon (alerts) and choose preferences from the bottom, signature will be in the menu on the left there https://www.thehelper.net/account/preferences
  • The Helper The Helper:
    I think I need to split the Sci/Tech news forum into 2 one for Science and one for Tech but I am hating all the moving of posts I would have to do
  • The Helper The Helper:
    What is up Old Mountain Shadow?
  • The Helper The Helper:
    Happy Thursday!
    +1
  • Varine Varine:
    Crazy how much 3d printing has come in the last few years. Sad that it's not as easily modifiable though
  • Varine Varine:
    I bought an Ender 3 during the pandemic and tinkered with it all the time. Just bought a Sovol, not as easy. I'm trying to make it use a different nozzle because I have a fuck ton of Volcanos, and they use what is basically a modified volcano that is just a smidge longer, and almost every part on this thing needs to be redone to make it work
  • Varine Varine:
    Luckily I have a 3d printer for that, I guess. But it's ridiculous. The regular volcanos are 21mm, these Sovol versions are about 23.5mm
  • Varine Varine:
    So, 2.5mm longer. But the thing that measures the bed is about 1.5mm above the nozzle, so if I swap it with a volcano then I'm 1mm behind it. So cool, new bracket to swap that, but THEN the fan shroud to direct air at the part is ALSO going to be .5mm to low, and so I need to redo that, but by doing that it is a little bit off where it should be blowing and it's throwing it at the heating block instead of the part, and fuck man
  • Varine Varine:
    I didn't realize they designed this entire thing to NOT be modded. I would have just got a fucking Bambu if I knew that, the whole point was I could fuck with this. And no one else makes shit for Sovol so I have to go through them, and they have... interesting pricing models. So I have a new extruder altogether that I'm taking apart and going to just design a whole new one to use my nozzles. Dumb design.
  • Varine Varine:
    Can't just buy a new heatblock, you need to get a whole hotend - so block, heater cartridge, thermistor, heatbreak, and nozzle. And they put this fucking paste in there so I can't take the thermistor or cartridge out with any ease, that's 30 dollars. Or you can get the whole extrudor with the direct driver AND that heatblock for like 50, but you still can't get any of it to come apart
  • Varine Varine:
    Partsbuilt has individual parts I found but they're expensive. I think I can get bits swapped around and make this work with generic shit though
  • Ghan Ghan:
    Heard Houston got hit pretty bad by storms last night. Hope all is well with TH.
  • The Helper The Helper:
    Power back on finally - all is good here no damage
    +2
  • V-SNES V-SNES:
    Happy Friday!
    +1

      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