Multiboard help

peoncaptain

Member!
Joined
Apr 14, 2004
Messages
19
Reaction score
0
Location
Croatia
Website
Visit site
I need help with multiboard.I got this:

multiboard
Events
Time - Elapsed game time is 0.50 seconds
Conditions
Actions
Multiboard - Create a multiboard with 4 columns and 13 rows, titled Player status
Multiboard - Set the text for (Last created multiboard) item in column 1, row 1 to Name
Multiboard - Set the width for (Last created multiboard) item in column 1, row 0 to 10.00% of the total screen width
Multiboard - Set the text for (Last created multiboard) item in column 3, row 1 to Kills
Multiboard - Set the width for (Last created multiboard) item in column 3, row 0 to 5.00% of the total screen width
Multiboard - Set the text for (Last created multiboard) item in column 2, row 1 to STATUS
Multiboard - Set the width for (Last created multiboard) item in column 2, row 0 to 7.00% of the total screen width
Multiboard - Set the text for (Last created multiboard) item in column 1, row 2 to (Name of Player 1 (Red))
Multiboard - Set the text for (Last created multiboard) item in column 1, row 3 to (Name of Player 2 (Blue))
Multiboard - Set the text for (Last created multiboard) item in column 1, row 4 to (Name of Player 3 (Teal))
Multiboard - Set the text for (Last created multiboard) item in column 1, row 5 to (Name of Player 4 (Purple))
Multiboard - Set the text for (Last created multiboard) item in column 1, row 6 to (Name of Player 5 (Yellow))
Multiboard - Set the text for (Last created multiboard) item in column 1, row 7 to (Name of Player 6 (Orange))
Multiboard - Set the text for (Last created multiboard) item in column 1, row 8 to (Name of Player 7 (Green))
Multiboard - Set the text for (Last created multiboard) item in column 1, row 9 to (Name of Player 8 (Pink))
Multiboard - Set the text for (Last created multiboard) item in column 1, row 10 to (Name of Player 9 (Gray))
Multiboard - Set the text for (Last created multiboard) item in column 1, row 11 to (Name of Player 10 (Light Blue))
Multiboard - Set the text for (Last created multiboard) item in column 1, row 12 to (Name of Player 11 (Dark Green))
Multiboard - Set the text for (Last created multiboard) item in column 1, row 13 to (Name of Player 12 (Brown))
Multiboard - Set the display style for (Last created multiboard) item in column 0, row 0 to Show text and Hide icons
What I need is I need to apply hero kills and make alive/dead/quit trigger unde status and score trigger(how to apply this to a multiboard?):
Hero kills
Events
Unit - A unit Dies
Conditions
((Owner of (Killing unit)) is an ally of (Owner of (Dying unit))) Equal to False
(Owner of (Triggering unit)) Not equal to (Owner of (Killing unit))
((Dying unit) is A Hero) Equal to True
Actions
Set Hero_kills[(Integer A)] = (Kills[(Player number of (Owner of (Killing unit)))] + 1)
Multiboard - Set the text for (Last created multiboard) item in column 3, row 2 to (String(Hero_kills[(Integer A)]))
And what should I place on that integer a thing?
 

ChrisH36

Guy with Most Posts on Quiet Board.
Joined
May 20, 2003
Messages
15,042
Reaction score
4
Location
Temple Prime, Sarajevo
2 things, one
NO DOUBLE POSTING, edit was invented for a reason.

Second, could you clarify the problem ON THE BOTTOM of the screen 2 lines apart from your trigger code. I can't read it!
 

JesusFreak

Member!
Joined
Apr 12, 2004
Messages
124
Reaction score
0
Location
In a Box, on the side of the street
Website
Visit site
first off don't use intergerA, unless you have only 1 person, make an integer
 

ChrisH36

Guy with Most Posts on Quiet Board.
Joined
May 20, 2003
Messages
15,042
Reaction score
4
Location
Temple Prime, Sarajevo
You mean array controlled by an integer? To control it, use seperate variables for the player numbers. Just like in C, its possible ;)
 

ChrisH36

Guy with Most Posts on Quiet Board.
Joined
May 20, 2003
Messages
15,042
Reaction score
4
Location
Temple Prime, Sarajevo
Do you know how to create variables? There is a function within Multiboard, it will set a value to a certain field. To make things easier, make an array so all elements can be stored into the multiboard without having to make a variable for each element.

Whats an array you ask? Well its a variable that hold multiple values eg:

In C:
int num[6]="24, 35, 100, 7, 0, 8";

In Warcraft III you would create an Integer variable, enable Array and put the number of elements to whatever the maximum fields there are. Next make 10 variables collecting the player number.

You only use 10 elements if you are planning on sorting the multiboard, which is not a good idea!!!
 

peoncaptain

Member!
Joined
Apr 14, 2004
Messages
19
Reaction score
0
Location
Croatia
Website
Visit site
That is my problem,I know how to get score to a leaderboard,but dont know how the heck should I get the score to multiboard...And If I do integers I need to make kill trigger for every player?
EDIT:I dont need any sorting on multiboard.What should I do with integers' Should I make a trigger for every player and integer for every player?
 

ChrisH36

Guy with Most Posts on Quiet Board.
Joined
May 20, 2003
Messages
15,042
Reaction score
4
Location
Temple Prime, Sarajevo
I think you can make player's score = integer and update it with another trigger every 2-3 seconds!

You can slap it in one trigger, and store all integers into a 10 element array.. Index should be associated with player number
 

JesusFreak

Member!
Joined
Apr 12, 2004
Messages
124
Reaction score
0
Location
In a Box, on the side of the street
Website
Visit site
umm you could do one big one

if a generic unit dies
unit is owned by player x
then
(if then else statement)
(if owner of attacking unit = player 1
then set Player1(the name of the integer) = player1 + 1
else
(leave blank))
and repeat for all players

at the end here put the multiboard updater stats or put them in with each player, so i only updates when a specific player kills, not updating all players
 

peoncaptain

Member!
Joined
Apr 14, 2004
Messages
19
Reaction score
0
Location
Croatia
Website
Visit site
I made this but it doesnt seem to work

Hero kills
Events
Unit - A unit Dies
Conditions
((Owner of (Killing unit)) is an ally of (Owner of (Dying unit))) Equal to False
(Owner of (Triggering unit)) Not equal to (Owner of (Killing unit))
((Dying unit) is A Hero) Equal to True
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Owner of (Triggering unit)) Equal to Player 1 (Red)
Then - Actions
Set player1_kills = (player1_kills + 1)
Multiboard - Set the text for (Last created multiboard) item in column 3, row 2 to (String(player1_kills))
Else - Actions
Do nothing

I made player1_kills integer without array(what doest array do?)
 

ChrisH36

Guy with Most Posts on Quiet Board.
Joined
May 20, 2003
Messages
15,042
Reaction score
4
Location
Temple Prime, Sarajevo
I just explained that.

An array is a series of values stored into one variable called upon using indexes.

Variablename[index] is the look

First you declare its type (integer, real, string, boolean etc.)
Then enable array
Then set the elements, note that 0 is an existing element

So if you want 10 elements, you need to set the element count to 9.

If I were to store values into

eg: a[9] = 14, 23, 45, 100, 7, 16, 19, 220, 154.

And i wanted to call upon 100, then I would use a[3], because 0 is an existing index and I wanted to called the 4th one. Why is this helpful, consider this:

If it was hero line wars and I wanted to store all incomes into variables i can do this

income[11]

raither than

income1
income2
...
income11

saved 10 slots of variables on one array. There is a function I beleive that accepts player numbers so you can store that into the indexes

If your confused, think of the array as a file cabinet. An index is what file set you want to take. There you go, if you still have problems. Then you'd better PM me

If - Conditions
(Owner of (Triggering unit)) Equal to Player 1 (Red)
Then - Actions
Set player1_kills = (player1_kills + 1)
Multiboard - Set the text for (Last created multiboard) item in column 3, row 2 to (String(player1_kills))
Why is string there, and triggering unit only works if you have a specific unit.
 

peoncaptain

Member!
Joined
Apr 14, 2004
Messages
19
Reaction score
0
Location
Croatia
Website
Visit site
Dont know,but it actually seems to work :D,but I got one mile long trigger...(for every player),I still seem not to fully understand array,(probably my bad english :/)But it works :D,now how should i make leave/playing trigger?
 

JesusFreak

Member!
Joined
Apr 12, 2004
Messages
124
Reaction score
0
Location
In a Box, on the side of the street
Website
Visit site
Hero kills
Events
Unit - A unit Dies
Conditions
((Owner of (Killing unit)) is an ally of (Owner of (Dying unit))) Equal to False
(Owner of (Triggering unit)) Not equal to (Owner of (Killing unit))
((Dying unit) is A Hero) Equal to True
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Owner of (Triggering unit)) Equal to Player 1 (Red)
Then - Actions
Set player1_kills = (player1_kills + 1)
Multiboard - Set the text for (Last created multiboard) item in column 3, row 2 to (String(player1_kills))
Else - Actions
Do nothing
I made player1_kills integer without array(what doest array do?)
that can be done easier:

Hero kills
Events
Unit - A unit Dies // this is good

Conditions
plater comparison - (owner of (dying unit)) equat to player ## // replace ## with who ever is the bad guy liek 11 or 12 or what ever the player is

Actions

If - Conditions
(Owner of (Triggering unit)) Equal to Player 1 (Red)

Then - Actions
Set player1_kills = (player1_kills + 1)
Multiboard - Set the text for (Last created multiboard) item in column 3, row 2 to (String(player1_kills))

Else - Actions
// leave this blank, it will automatically do nothing, and i think it takes up more memory to add the "do nothing" tag to the else

ok and for the array, it works kinda like this:

when you set an integer to be an array it just makes many integers into one integer list, kinda like he said:

Playerkills (array of 12) is like this:
0
0
0
0
0
0
0
0
0
0
0
0

it is the same as doing
playerkills1
playerkills2
playerkills3
playerkills4
playerkills5
playerkills6
playerkills7
playerkills8
playerkills9
playerkills10
playerkills11
playerkills12

but takes up less memory (i think), and makes it less cluttered
if u wanted to use an array, it is ok to foget about 0, a just make it an arry of 12, the 0 can be quite confusing, so player 1 can be playerkill(1) slot one, you don't have to make it slot 0

for all you guys out there, 0 was used a long time ago to save memory, but now'a'days, you don't need to use it as we have tons of memory, and it is insignificant.
 

Darimus

BattleForums Addict
Joined
Oct 2, 2003
Messages
681
Reaction score
0
Website
www.spaceman.vze.com
Making an array will not take up less memory. Integers are always 4 bytes, and an array of them takes the same amount as seperate Integers.

You would also use an array of 13 integers to do 12 players, if you wanted to start at 1 and go to 12... but in the case of warcraft III it does not matter since it will not crash when you try to assign a value to an array that's higher than the size (They either use vectors[C++... so I doubt it] or just create a new array to resize it[Not specific to C++])
 

ChrisH36

Guy with Most Posts on Quiet Board.
Joined
May 20, 2003
Messages
15,042
Reaction score
4
Location
Temple Prime, Sarajevo
All making an array does is to avoid confusion. As I said you're better off with income[11] then having 12 different incomes (YES, 0 is an index).
 

Darimus

BattleForums Addict
Joined
Oct 2, 2003
Messages
681
Reaction score
0
Website
www.spaceman.vze.com
Not only does it avoid potential confusion [I've never used them because of this..], but they save alot of time, which is the main reason I use them.
 

Paella

Member!
Joined
Jan 17, 2005
Messages
46
Reaction score
0
JesusFreak I would just use an array and have it use the player number function to do the deaths count thing, actually that is how I did it in my Stalingrad map. Here is the code for kill count

Multiboard - Set the text for (Last created multiboard) item in column 3, row 3 to (String((Player 1 (Red) Heroes Killed)))
 

ChrisH36

Guy with Most Posts on Quiet Board.
Joined
May 20, 2003
Messages
15,042
Reaction score
4
Location
Temple Prime, Sarajevo
Niether do I bro, neither do I :(
 

NewPosts

New threads

Top