Dialogue buttons, I'm lost

Lady MufflaN

New Member
Reaction score
4
Right, I need to create a "simple" dialogue button that asks "Left" or "Right" where the poor heroes in my map need to chose if they go left or right, I guess adding each response to a integer and then do a simple if / then / else is the proper way, but then again, I'm not stuck there, I dunno how to create the buttons :\
 

San-D

New Member
Reaction score
15
Dialoges are Variables, u can't just create them like Multiboards.

Make a Variable for:
Dialog Box
"Left" Button
"Right" Button

make a trigger

Code:
Untitled Trigger 001
    Events
    Conditions
    Actions
        Dialog - Change the title of DIA to Ur Title
        Dialog - Create a dialog button for a labelled Left
        Set BUT1 = (Last created dialog Button)
        Dialog - Create a dialog button for a labelled Right
        Set BUT2 = (Last created dialog Button)
        Dialog - Show a for Player 1 (Red)
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
            Then - Actions
            Else - Actions
 

Lady MufflaN

New Member
Reaction score
4
Right, will this work then? My beta testers are a lazy bunch so I can't know for sure :(

Code:
Do we go left or right
    Events
        Unit - A unit enters ChoseYourDestiny <gen>
    Conditions
    Actions
        Dialog - Change the title of ChooseYourDestiny to Choose Your Destiny
        Dialog - Create a dialog button for ChooseYourDestiny labelled Right
        Set Right = (Last created dialog Button)
        Dialog - Create a dialog button for ChooseYourDestiny labelled Left
        Set Left = (Last created dialog Button)
        Player Group - Pick every player in Team1 and do (Actions)
            Loop - Actions
                Dialog - Show ChooseYourDestiny for (Picked player)
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (Clicked dialog button) Equal to Left
                    Then - Actions
                        Set LeftInt = (LeftInt + 1)
                    Else - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (Clicked dialog button) Equal to Right
                    Then - Actions
                        Set RightInt = (RightInt + 1)
                    Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                LeftInt Greater than or equal to 3
            Then - Actions
                Destructible - Kill ForceWall 5704 <gen>
            Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                RightInt Greater than or equal to 3
            Then - Actions
                Destructible - Kill ForceWall 5703 <gen>
            Else - Actions
 

Squishy

You can change this now in User CP.
Reaction score
127
You dont use If/Then/Elses for Dialogs. You need to make another trigger for each option. Use the event Dialog-Dialog Button is clicked and then a condition to check which one was clicked.
 

Lady MufflaN

New Member
Reaction score
4
You dont use If/Then/Elses for Dialogs. You need to make another trigger for each option. Use the event Dialog-Dialog Button is clicked and then a condition to check which one was clicked.

Like this?

Trigger #1

Code:
Do we go left or right
    Events
        Unit - A unit enters ChoseYourDestiny <gen>
    Conditions
        ((Triggering unit) is A Hero) Equal to True
    Actions
        Dialog - Change the title of ChooseYourDestiny to Choose Your Destiny
        Dialog - Create a dialog button for ChooseYourDestiny labelled Right
        Set Right = (Last created dialog Button)
        Dialog - Create a dialog button for ChooseYourDestiny labelled Left
        Set Left = (Last created dialog Button)
        Player Group - Pick every player in Team1 and do (Actions)
            Loop - Actions
                Dialog - Show ChooseYourDestiny for (Picked player)

Trigger #2

Code:
Left
    Events
        Dialog - A dialog button is clicked for ChooseYourDestiny
    Conditions
        (Clicked dialog button) Equal to Left
    Actions
        Set LeftInt = (LeftInt + 1)
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                LeftInt Greater than or equal to 3
            Then - Actions
                Destructible - Kill ForceWall 5704 <gen>
            Else - Actions

Trigger #3

Code:
Right
    Events
        Dialog - A dialog button is clicked for ChooseYourDestiny
    Conditions
        (Clicked dialog button) Equal to Right
    Actions
        Set RightInt = (RightInt + 1)
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                RightInt Greater than or equal to 3
            Then - Actions
                Destructible - Kill ForceWall 5703 <gen>
            Else - Actions
 

Squishy

You can change this now in User CP.
Reaction score
127
Try putting Dialog-Clear Dialog before the actions in the first trigger.
 
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