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 Page
Feedback Thread
Latest Video
Published Regions: SEA, NA, EU, KOR
Status: Open Beta
willuwontu Regular ShmoeLike 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?
I'm watching you
Need Help with dialogs? Use Dialogception