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.

      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