Dialogs

Ryuu

I am back with Chocolate (:
Reaction score
64
Just a minute before I created this thread I was insulting myself and thinking how 'noobish' I was.

Well thing is I just couldn't find out how to display a dialog to all players that is MUI and such..

Cause You see, you could make a dialog display to one player just like that:

Trigger:
  • New or Load Dialog
    • Events
      • Time - Elapsed game time is 0.00 seconds
    • Conditions
    • Actions
      • Dialog - Change the title of NewLoadDialog to New or Load Game?
      • Dialog - Create a dialog button for NewLoadDialog labelled New
      • Set NewLoadDialogButtons[1] = (Last created dialog Button)
      • Dialog - Create a dialog button for NewLoadDialog labelled Load
      • Set NewLoadDialogButtons[2] = (Last created dialog Button)
      • Dialog - Show NewLoadDialog for Player 1 (Red)


and

Trigger:
  • New Load Dialog But
    • Events
      • Dialog - A dialog button is clicked for NewLoadDialog
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Clicked dialog button) Equal to NewLoadDialogButtons[1]
        • Then - Actions
          • -------- actions.. --------
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Clicked dialog button) Equal to NewLoadDialogButtons[2]
        • Then - Actions
          • -------- actions.. --------
        • Else - Actions


But how do I exactly make it for every player?

Off-topic question:
How do I refer to the player who clicked on the dialog button?
 

perkeyone

something clever
Reaction score
71
1) make a loop

for every integer A from 1 to 12
show new dialog for player (integer A)

2) refer to the clicking player as "triggering player"
 

Ryuu

I am back with Chocolate (:
Reaction score
64
Yes that seems easy, but not as easy as you thought.
The thing is, I have to clear the dialog because I have a lot of dialogs in my map, and I have to recycle some.

Different dialogs may come in at different times but using the same variable.
Therefore when I clear a dialog, the player that is still viewing the dialog will be able to see no buttons.

And that is the problem.
 

perkeyone

something clever
Reaction score
71
can you clear a dialog for only one player at a time? or do you have to clear it for all players?
 

Ryuu

I am back with Chocolate (:
Reaction score
64
Trigger:
  • Dialog - Clear Dialog


This is a general action, you can't specify a player.
 

perkeyone

something clever
Reaction score
71
well when do the dialogs come up?
do they come up for all players each time?
why dont you just wait for all players to make a selection before clearing the dialog?
 

Ryuu

I am back with Chocolate (:
Reaction score
64
> well when do the dialogs come up?

They come up separately to each player, at different timings throughout the entire game.​

> do they come up for all players each time?

Nope. Different players would have different dialogs at different timings.​

> why dont you just wait for all players to make a selection before clearing the dialog?

That would slow the game down.​
 

CaptDeath

New Member
Reaction score
103
if its nessissairy to clear the dialogs
then just make different "dialogs" per player
is
Player1_NewLoad....
.....
.............
...................
 

Ryuu

I am back with Chocolate (:
Reaction score
64
This is inefficient.
Obviously there got to be some other easier, and more efficient method.
 

CaptDeath

New Member
Reaction score
103
if vJass is an option why not use a 2d array?

i still fail to see the reason behind wipeing dialogs is that to make them dynamic?(i only ever used static dialogs)
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top