So I got this error. I am not sure why though. I know what an array is and I am trying to use them to create dialogs for players so their dialog selections are unique to themselves. As in when a player clicks a dialog button it doesn't click it for everyone.
Upon map initialization: Setup your dialog with contents (dialog items), sizes, anchoring, etc. and store them in global variables. Do not add text to labels and buttons unless all players should see the specific text you add. Do not show the dialog yet. NOTICE: "Dialog" is singular, as you only need one variable for handling all players, even when you wish to display different contents for different players. You do not need arrays for dialogs or dialog items.
On request: Change the text, positioning, size, etc. on the dialog items using the global variables you defined before. Do not create new dialog items, simply update the existing ones stored in the global variables. Updating text for instance is done through the call "Set Dialog Item Text". Remember to only update the content for the desired player group - can be just one player (the 'Triggering Player' for instance). You can now show the dialog for the desired player group (should be the same as I just mentioned), and the content has been updated for that/those specific player/players only.
Hmmm, sounds a lot easier. I'll give it a try and see how it goes. I know each player will have a dialog menu with list boxes they will be modifying separately. And showing/hiding their dialog throughout the game.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
So I got this error. I am not sure why though. I know what an array is and I am trying to use them to create dialogs for players so their dialog selections are unique to themselves. As in when a player clicks a dialog button it doesn't click it for everyone.
@Suterusu1337: Go
What size has that array? There is a player in Team_Creep that is out of bounds.
Try to make it send a message with Picked Player before creating the dialog and take a look at what number it bugs out.
Remember players are numbered 0-15. There may be an extra player in your player group that you are overlooking causing the overflow.
@Suterusu1337: Go
you can just create 1 dialog for all players and then show/hide and respond player specific to actions concerning the dialog.
ofcourse if you're altering the dialog by adding/removing dialog items then you will need a dialog per player.
@Suterusu1337: Go
Those tricky dialogs!
Upon map initialization: Setup your dialog with contents (dialog items), sizes, anchoring, etc. and store them in global variables. Do not add text to labels and buttons unless all players should see the specific text you add. Do not show the dialog yet. NOTICE: "Dialog" is singular, as you only need one variable for handling all players, even when you wish to display different contents for different players. You do not need arrays for dialogs or dialog items.
On request: Change the text, positioning, size, etc. on the dialog items using the global variables you defined before. Do not create new dialog items, simply update the existing ones stored in the global variables. Updating text for instance is done through the call "Set Dialog Item Text". Remember to only update the content for the desired player group - can be just one player (the 'Triggering Player' for instance). You can now show the dialog for the desired player group (should be the same as I just mentioned), and the content has been updated for that/those specific player/players only.
@Kafoso: Go
Hmmm, sounds a lot easier. I'll give it a try and see how it goes. I know each player will have a dialog menu with list boxes they will be modifying separately. And showing/hiding their dialog throughout the game.