Dialog - Create a Modal dialog of size (Dialog Width, Dialog Height) at (0, 0) relative to Center of screen
Variable - set user selection dialog = (last created dialog)
General - For each integer iRow from 1 to nRows with increment 1, do (Actions)
Actions
Variable - Set x = cDialog Border
General - For each integer iCol from 1 to nCols with increment 1, do (Actions)
Actions
General - If (Conditions) then do (Actions) else do (Actions)
If
iButton < nUnit Buttons
Then
Dialog - Create a button for dialog (Last created dialog) with the dimensions (cButton Size, cButton Size) anchored to Top Left with
an offset of (x, y) setting the tooltip to Unit Buttons[iButton].Tooltip with button text "" and the hover image set to ""
Dialog - Create an image for dialog (Last created dialog) with the dimensions (cIcon Size, cIcon Size) anchored to Top Left with an offset of ((+ (x, cButton Inlay)), (+ (y, cButton Inlay))) setting the tooltip to "" using the image Unit Buttons[iButton].Icon as a Normal type with tiled set to false tint color White and blend mode Normal
Thanks for the suggestion. After finding a good spot to place it, (wanted to nest it in a funtion i had already) it worked. (nope nvm now) IDK why don't ask me, but editor is weird about that for some reason. All my other dialog is shown 1 by 1 in my map so i never had problems with any others, but yeah 1 by 1 is the way.
Your variables are wrong. Your setting the variable "unit selection dialog" and then calling "user selection dialog" which do not match. If is this not it please post the actual text from the editor.
Is the custom dialog function threaded, because that might make it show for only a few people (also trying putting the show action inside of the function at the end). Other than that i can only think of the use of active players instead of all players or a predefined group which tend to work better especially in editor testing.
I was doing active players before T_T. But I"VE GOT IT FIXED NOW :). Trieva got me on the right path for fixing it. I had to do it individually, but the for player group loop didn't work, i had to do a for each integer from 1 to 15 inc 1. With an if then checking if the status of the player was that he was playing. Then show it to player x. I attached a picture to explain better.
Like the title says my dialog won't show if there is more than 1 person in the game.
This dialog is based on the Basic dialog part 1
Variables
User selection Dialog=no dialog<dialog>
Function: User selection dialog-create
Local Variables nRows = (Ceiling(((Real(nUnit Buttons)) / (Real(nCols))))) <Integer>
Dialog Width = (+ (cDialog Extra, ((+ (cButton Size, cButton Gap)) * nCols))) <Integer>
Dialog Height = (+ (cDialog Extra, ((+ (cButton Size, cButton Gap)) * nRows))) <Integer>
x = cDialog Border <Integer>
y = cDialog Border <Integer>
iRow = 0 <Integer>
iCol = 0 <Integer>
iButton = 0 <Integer>
Actions
Dialog - Create a Modal dialog of size (Dialog Width, Dialog Height) at (0, 0) relative to Center of screen
Variable - set user selection dialog = (last created dialog)
General - For each integer iRow from 1 to nRows with increment 1, do (Actions)
Actions
Variable - Set x = cDialog Border
General - For each integer iCol from 1 to nCols with increment 1, do (Actions)
Actions
General - If (Conditions) then do (Actions) else do (Actions)
If
iButton < nUnit Buttons
Then
Dialog - Create a button for dialog (Last created dialog) with the dimensions (cButton Size, cButton Size) anchored to Top Left with an offset of (x, y) setting the tooltip to Unit Buttons[iButton].Tooltip with button text "" and the hover image set to ""
Dialog - Create an image for dialog (Last created dialog) with the dimensions (cIcon Size, cIcon Size) anchored to Top Left with an offset of ((+ (x, cButton Inlay)), (+ (y, cButton Inlay))) setting the tooltip to "" using the image Unit Buttons[iButton].Icon as a Normal type with tiled set to false tint color White and blend mode Normal
Else
Variable - Modify x: + (+ (cButton Size, cButton Gap))
Variable - Modify iButton: + 1
Variable - Modify y: + (+ (cButton Size, cButton Gap))
End
I then call it up in my own trigger
Trigger: Start of game
Event: Map initialization Actions:
Initialize unit buttons () User selection dialog create () Dialog - show user selection dialog for (active players)
End
When i play by my self they show up, but when i add other people they don't show at all. Any ideas?
Still alive and kicking, just busy.
My guide to the trigger editor (still a work in progress)
Thanks for the suggestion. After finding a good spot to place it, (wanted to nest it in a funtion i had already) it worked. (nope nvm now) IDK why don't ask me, but editor is weird about that for some reason. All my other dialog is shown 1 by 1 in my map so i never had problems with any others, but yeah 1 by 1 is the way.
Still alive and kicking, just busy.
My guide to the trigger editor (still a work in progress)
Nvm still not working, aaaargh
I'll get back to working on this in the morning.
Still alive and kicking, just busy.
My guide to the trigger editor (still a work in progress)
Your variables are wrong. Your setting the variable "unit selection dialog" and then calling "user selection dialog" which do not match. If is this not it please post the actual text from the editor.
Sorry bout that, it was supposed to be user selection dialog up there. Just wasn't thinking when I typed it I guess. Fixed it now though.
Still alive and kicking, just busy.
My guide to the trigger editor (still a work in progress)
Is the custom dialog function threaded, because that might make it show for only a few people (also trying putting the show action inside of the function at the end). Other than that i can only think of the use of active players instead of all players or a predefined group which tend to work better especially in editor testing.
I was doing active players before T_T. But I"VE GOT IT FIXED NOW :). Trieva got me on the right path for fixing it. I had to do it individually, but the for player group loop didn't work, i had to do a for each integer from 1 to 15 inc 1. With an if then checking if the status of the player was that he was playing. Then show it to player x. I attached a picture to explain better.
Still alive and kicking, just busy.
My guide to the trigger editor (still a work in progress)