Hi I'm wondering what the best practice is for "global/navigation" dialogs that will be consistent for all players but will hold different states for each player. Do I need to create the whole set of dialogs for each player and store them in an array, one element for each player? Or can I create one set of dialogs and then just use Triggering Player and related to handle individual player interactions? I started with the latter but it seems pretty difficult to handle different users that way...thoughts would be appreciated.
The way I do it is I just make one dialog, set it fullscreen, hide the background, then just use dialog items for everything else (since they are on a per player basis). Then I make a dialog item image and just set its image to some background image, then attach other dialog items to that background to simulate a dialog, but one that will allow me to move it around/set transparency etc for each player.
The only bad thing about this is that I can't just use "Show/Hide Dialog" to hide all the dialog items within that dialog item background, since its just a dialog item, I have to manually show/hide each dialog item attached to that dialog item, but this can be simplified with making an action definition.
Thanks - that will take some time for me to digest. In the meantime, I'm actually hoping to use Screen Buttons as they seem to be easier to customize style-wise. How can I get the player who clicked a button? I can't seem to get that hook...and I can't seem to attach a function with parameters to a screen button. It only will fire a named trigger, and of course triggers don't have parameters, but the trigger can also not get at "Triggering Player" so I'm stumped as to how to figure out which player clicked a screen button. Any ideas?
Yeah, you gotta make a trigger with the event "Dialog Item is Used":
Button Clicked
Events
Dialog - Any Dialog Item is used by Player Any Player with event type Clicked
Local Variables
Conditions
(Used dialog item) == (Screen button 1)
Actions
------- Do Stuff
Then just use Triggering Player to the the player who clicked the dialog item. (Screen Buttons are just dialog items that can be recalled by its ID or you can save it into a variable)
If you use this method, leave trigger callback blank.
Hi I'm wondering what the best practice is for "global/navigation" dialogs that will be consistent for all players but will hold different states for each player. Do I need to create the whole set of dialogs for each player and store them in an array, one element for each player? Or can I create one set of dialogs and then just use Triggering Player and related to handle individual player interactions? I started with the latter but it seems pretty difficult to handle different users that way...thoughts would be appreciated.
The way I do it is I just make one dialog, set it fullscreen, hide the background, then just use dialog items for everything else (since they are on a per player basis). Then I make a dialog item image and just set its image to some background image, then attach other dialog items to that background to simulate a dialog, but one that will allow me to move it around/set transparency etc for each player.
The only bad thing about this is that I can't just use "Show/Hide Dialog" to hide all the dialog items within that dialog item background, since its just a dialog item, I have to manually show/hide each dialog item attached to that dialog item, but this can be simplified with making an action definition.
Thanks - that will take some time for me to digest. In the meantime, I'm actually hoping to use Screen Buttons as they seem to be easier to customize style-wise. How can I get the player who clicked a button? I can't seem to get that hook...and I can't seem to attach a function with parameters to a screen button. It only will fire a named trigger, and of course triggers don't have parameters, but the trigger can also not get at "Triggering Player" so I'm stumped as to how to figure out which player clicked a screen button. Any ideas?
Yeah, you gotta make a trigger with the event "Dialog Item is Used":
Button Clicked
Events
Dialog - Any Dialog Item is used by Player Any Player with event type Clicked
Local Variables
Conditions
(Used dialog item) == (Screen button 1)
Actions
------- Do Stuff
Then just use Triggering Player to the the player who clicked the dialog item. (Screen Buttons are just dialog items that can be recalled by its ID or you can save it into a variable)
If you use this method, leave trigger callback blank.
Okay I didn't realize that buttons were just dialog items. Very helpful.