NeuroToxin
New Member
- Reaction score
- 46
I realize how to create it and such, but can anyone explain the basics of creating, well, heres my trigger,
I'm trying to create a custom multiboard, like you can set it up at anytime, anything, however, I need help with the number of rows, and when theres columns, I need it to follow the number of things they have. For example, say that they have kills/deaths enabled, then it adds two columns. I also need help setting the number of rows. In the setup, I'm gonna have a lot of if's, considering I need one for every single boolean I have. Like, how many columns for a players name? (Like space) how many columns for things, how do I get the correct amount of columns? Questions like that, the setup of a FULLY CUSTOMIZABLE multiboard. Like, EVERYTHING is multiboard.
JASS:
library CustomMultiboard initializer Init
globals
//The number of teams on the multiboard. Can be increased or decreased to set more teams.
private constant integer NUM_TEAMS = 5
//The number of players to be displayed on the multiboard.
private constant integer NUM_PLAYERS = 10
//The number of rows to have.
private constant integer NUM_ROWS = (NUM_PLAYERS + NUM_TEAMS) + 3
//The number of columns to have.
private constant integer NUM_COLUMNS = 20
//If true, will show each player the same multiboard
private constant boolean SHOW_FOR_ENEMIES = false
//The number of heroes using this multiboard
private constant integer NUM_HEROES = 1
//The heroes global, only thing required with this is the number of heroes you're using. To edit the
//unit types look for the function below called SETTING_HEROES
private constant integer array HEROES[NUM_HEROES]
//Same as above.
private constant string array HERO_ICONS[NUM_HEROES]
//The decision to show or hide hero icons.
private constant boolean SHOW_HERO_ICONS = true
endglobals
private function SETTING_HEROES takes nothing returns nothing
set HEROES[1] = 039;Hamg039;
set HERO_ICONS[1] = "ReplaceableTextures\\CommandButtons\\BTNHeroArchMage.blp"
endfunction
private function Setup takes nothing returns nothing
local multiboard m = CreateMultiboard()
local integer i = 0
local integer row = 1
call MultiboardClear(m)
call MultiboardDisplay( m, true)
call MultiboardSetColumnCount(m, NUM_COLUMNS)
call MultiboardSetRowCount(m, NUM_ROWS)
loop
call MultiboardSetItemIconBJ( m, 0, row, HERO_ICONS<i>)
set i = i + 1
exitwhen i == NUM_HEROES
endloop
endfunction
//===========================================================================
private function Init takes nothing returns nothing
local trigger t = CreateTrigger( )
call TriggerAddAction( t, function Setup )
endfunction
endlibrary
</i>
I'm trying to create a custom multiboard, like you can set it up at anytime, anything, however, I need help with the number of rows, and when theres columns, I need it to follow the number of things they have. For example, say that they have kills/deaths enabled, then it adds two columns. I also need help setting the number of rows. In the setup, I'm gonna have a lot of if's, considering I need one for every single boolean I have. Like, how many columns for a players name? (Like space) how many columns for things, how do I get the correct amount of columns? Questions like that, the setup of a FULLY CUSTOMIZABLE multiboard. Like, EVERYTHING is multiboard.