My question is Kinda complected. I have all these dialog panels, And of course they get in the way of the players view, so I need to make show/hide buttons, like the one on leaderboards, I'v been somewhat successful. How should I do it
@xxQdotxx: Go
Create a boolean array to store the show/hide states for the dialog.
I'm assuming you have a dialog button item that you want to use to show and hide the dialog.
Add a trigger that runs on the event a player clicks the button. Make it do the following.
//GLOBALSbool[15]isShow;//Declare This as a global, it saves the states of whether each player is viewing or hiding the dialog.intyourdialog;//Save the dialog ID into here so it can later be called back.//TRIGGERintplayerplayergroupgSetVariable(player,EventPlayer())//Store player indexSetVariable(g,PlayerGroupSingle(player))//Store playergroupSetVariable(isShow[player],!isShow[player])//Invert the booleans stateDialogSetVisible(yourdialog,g,isShow[player])//Show/Hide Dialog.
If you have more than one dialog, i suppose you could use multiple boolean arrays to monitor the state of each one. Or you could use just one universal boolean array, then force any open dialogs to close if another is opened. Remember to reset the state though or it's gona get messy.
My question is Kinda complected. I have all these dialog panels, And of course they get in the way of the players view, so I need to make show/hide buttons, like the one on leaderboards, I'v been somewhat successful. How should I do it
@xxQdotxx: Go Create a boolean array to store the show/hide states for the dialog.
I'm assuming you have a dialog button item that you want to use to show and hide the dialog.
Add a trigger that runs on the event a player clicks the button. Make it do the following.
If you have more than one dialog, i suppose you could use multiple boolean arrays to monitor the state of each one. Or you could use just one universal boolean array, then force any open dialogs to close if another is opened. Remember to reset the state though or it's gona get messy.