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
User selection Dialog=no dialog<dialog>
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>
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)
Variable - Set x = cDialog Border
General - For each integer iCol from 1 to nCols with increment 1, do (Actions)
General - If (Conditions) then do (Actions) else do (Actions)
iButton < nUnit Buttons
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
Variable - Modify x: + (+ (cButton Size, cButton Gap))
Variable - Modify iButton: + 1
Variable - Modify y: + (+ (cButton Size, cButton Gap))
I then call it up in my own trigger
Event: Map initialization
Initialize unit buttons ()
User selection dialog create ()
Dialog - show user selection dialog for (active players)
When i play by my self they show up, but when i add other people they don't show at all.
I'm watching you
Need Help with dialogs? Use Dialogception
Instead of showing the user selection dialog to active players try a loop and select each individual player. I don't know why this would work (but is worth a try) though.
Current Project: SquadCraft 2
Project PageFeedback ThreadLatest VideoPublished Regions: SEA, NA, EU, KORStatus: Open Beta
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.
Nvm still not working, aaaargh
I'll get back to working on this in the morning.
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.
When I want your opinion...I'll give it to you!
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.
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.
You must login to post a comment. Don't have an account? Register to get one!