[Trigger] Unique Select System Help Please

Level 4
Joined
Dec 4, 2007
Messages
76
Ok so in my rpg im using a unique selection system where you choose your gender (Male or Female) and then a dialogue box comes up and you get to choose your main attribute. Problem is, my dialogue arrays dont work, no one other than player 1 red can see the dialogue and if someone enters the selection circle b4 red chooses main attribute, it destroys his dialogue...Heres the triggers, im probably missing something obvious or overcomplicating things but anyways...help is appreciated...

  • Male
    • Events
      • Unit - A unit comes within 65.00 of Circle of Power 0026 <gen>
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to Wisp
    • Actions
      • Set IsMale[(Player number of (Triggering player))] = True
      • Set Dialoguer[(Player number of (Owner of (Triggering unit)))] = (Owner of (Triggering unit))
      • Unit - Kill (Triggering unit)
      • Dialog - Clear MainDialog[(Player number of (Owner of (Triggering unit)))]
      • Dialog - Change the title of MainDialog[(Player number of (Owner of (Triggering unit)))] to Main Attribute:
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Dialoguer[1] Equal to Player 1 (Red)
        • Then - Actions
          • Dialog - Create a dialog button for MainDialog[1] labelled Strength
          • Set DButton[1] = (Last created dialog Button)
          • Dialog - Create a dialog button for MainDialog[1] labelled Agility
          • Set DButton[2] = (Last created dialog Button)
          • Dialog - Create a dialog button for MainDialog[1] labelled Intelligence
          • Set DButton[3] = (Last created dialog Button)
          • Dialog - Show MainDialog[1] for Player 1 (Red)
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Dialoguer[2] Equal to Player 2 (Blue)
            • Then - Actions
              • Dialog - Create a dialog button for MainDialog[2] labelled Strength
              • Set DButton_Copy[1] = (Last created dialog Button)
              • Dialog - Create a dialog button for MainDialog[2] labelled Agility
              • Set DButton_Copy[2] = (Last created dialog Button)
              • Dialog - Create a dialog button for MainDialog[2] labelled Intelligence
              • Set DButton_Copy[3] = (Last created dialog Button)
              • Dialog - Show MainDialog[2] for Player 2 (Blue)
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • Dialoguer[3] Equal to Player 3 (Teal)
                • Then - Actions
                  • Dialog - Create a dialog button for MainDialog[3] labelled Strength
                  • Set DButton_Copy_2[1] = (Last created dialog Button)
                  • Dialog - Create a dialog button for MainDialog[3] labelled Agility
                  • Set DButton_Copy_2[2] = (Last created dialog Button)
                  • Dialog - Create a dialog button for MainDialog[3] labelled Intelligence
                  • Set DButton_Copy_2[3] = (Last created dialog Button)
                  • Dialog - Show MainDialog[3] for Player 3 (Teal)
                • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • Dialoguer[4] Equal to Player 4 (Purple)
                    • Then - Actions
                      • Dialog - Create a dialog button for MainDialog[4] labelled Strength
                      • Set DButton_Copy_3[1] = (Last created dialog Button)
                      • Dialog - Create a dialog button for MainDialog[4] labelled Agility
                      • Set DButton_Copy_3[2] = (Last created dialog Button)
                      • Dialog - Create a dialog button for MainDialog[4] labelled Intelligence
                      • Set DButton_Copy_3[3] = (Last created dialog Button)
                      • Dialog - Show MainDialog[4] for Player 4 (Purple)
                    • Else - Actions
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • Dialoguer[5] Equal to Player 5 (Yellow)
                        • Then - Actions
                          • Dialog - Create a dialog button for MainDialog[5] labelled Strength
                          • Set DButton_Copy_4[1] = (Last created dialog Button)
                          • Dialog - Create a dialog button for MainDialog[5] labelled Agility
                          • Set DButton_Copy_4[2] = (Last created dialog Button)
                          • Dialog - Create a dialog button for MainDialog[5] labelled Intelligence
                          • Set DButton_Copy_4[3] = (Last created dialog Button)
                          • Dialog - Show MainDialog[5] for Player 5 (Yellow)
                        • Else - Actions
                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            • If - Conditions
                              • Dialoguer[6] Equal to Player 6 (Orange)
                            • Then - Actions
                              • Dialog - Create a dialog button for MainDialog[6] labelled Strength
                              • Set DButton_Copy_5[1] = (Last created dialog Button)
                              • Dialog - Create a dialog button for MainDialog[6] labelled Agility
                              • Set DButton_Copy_5[2] = (Last created dialog Button)
                              • Dialog - Create a dialog button for MainDialog[6] labelled Intelligence
                              • Set DButton_Copy_5[3] = (Last created dialog Button)
                              • Dialog - Show MainDialog[6] for Player 6 (Orange)
                            • Else - Actions
                              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                • If - Conditions
                                  • Dialoguer[7] Equal to Player 7 (Green)
                                • Then - Actions
                                  • Dialog - Create a dialog button for MainDialog[7] labelled Strength
                                  • Set DButton_Copy_6[1] = (Last created dialog Button)
                                  • Dialog - Create a dialog button for MainDialog[7] labelled Agility
                                  • Set DButton_Copy_6[2] = (Last created dialog Button)
                                  • Dialog - Create a dialog button for MainDialog[7] labelled Intelligence
                                  • Set DButton_Copy_6[3] = (Last created dialog Button)
                                  • Dialog - Show MainDialog[7] for Player 7 (Green)
                                • Else - Actions
                                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                    • If - Conditions
                                      • Dialoguer[8] Equal to Player 8 (Pink)
                                    • Then - Actions
                                      • Dialog - Create a dialog button for MainDialog[8] labelled Strength
                                      • Set DButton_Copy_7[1] = (Last created dialog Button)
                                      • Dialog - Create a dialog button for MainDialog[8] labelled Agility
                                      • Set DButton_Copy_7[2] = (Last created dialog Button)
                                      • Dialog - Create a dialog button for MainDialog[8] labelled Intelligence
                                      • Set DButton_Copy_7[3] = (Last created dialog Button)
                                      • Dialog - Show MainDialog[8] for Player 8 (Pink)
                                    • Else - Actions
      • Camera - Pan camera for (Owner of (Triggering unit)) to (Center of ClassSelection <gen>) with height 500.00 above the terrain over 0.50 seconds
      • Wait 0.50 seconds
      • Camera - Reset camera for (Owner of (Triggering unit)) to standard game-view over 0.50 seconds

Thats for picking the char...heres actual dialog.

  • Red
    • Events
      • Dialog - A dialog button is clicked for MainDialog[1]
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Clicked dialog button) Equal to DButton[1]
        • Then - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • IsMale[1] Equal to True
            • Then - Actions
              • Unit - Create 1 Male (Strength) for Player 1 (Red) at (Center of ClassSelection <gen>) facing Default building facing degrees
              • Dialog - Clear MainDialog[1]
            • Else - Actions
              • Unit - Create 1 Female (Strength) for Player 1 (Red) at (Center of ClassSelection <gen>) facing Default building facing degrees
              • Dialog - Clear MainDialog[1]
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Clicked dialog button) Equal to DButton[2]
        • Then - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • IsMale[1] Equal to True
            • Then - Actions
              • Unit - Create 1 Male (Agility) for Player 1 (Red) at (Center of ClassSelection <gen>) facing Default building facing degrees
              • Dialog - Clear MainDialog[1]
            • Else - Actions
              • Unit - Create 1 Female (Agility) for Player 1 (Red) at (Center of ClassSelection <gen>) facing Default building facing degrees
              • Dialog - Clear MainDialog[1]
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Clicked dialog button) Equal to DButton[3]
        • Then - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • IsMale[1] Equal to True
            • Then - Actions
              • Unit - Create 1 Male (Intelligence) for Player 1 (Red) at (Center of ClassSelection <gen>) facing Default building facing degrees
              • Dialog - Clear MainDialog[1]
            • Else - Actions
              • Unit - Create 1 Female (Intelligence) for Player 1 (Red) at (Center of ClassSelection <gen>) facing Default building facing degrees
              • Dialog - Clear MainDialog[1]
        • Else - Actions

Thanks for any advice =\
 
Level 3
Joined
Sep 13, 2008
Messages
63
First, you need to learn to use a more dynamic system, instead of repeating code for all players. Anyways, I'll try. Be back in a bit, need to remake that.

After looking at it I don't see anything else expect that you don't have a trigger for selecting a dialog button for any players except red (player 1).

Try using and modifying my trigger? BTW, this is untested.
-All players see the same dialog, so you only need one copy of it.
  • Dialog
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Dialog - Change the title of dialog to MAIN ATTRIBUTE
      • Dialog - Create a dialog button for dialog labelled Strength
      • Set dialogButton[1] = (Last created dialog Button)
      • Dialog - Create a dialog button for dialog labelled Agility
      • Set dialogButton[2] = (Last created dialog Button)
      • Dialog - Create a dialog button for dialog labelled Intelligence
      • Set dialogButton[3] = (Last created dialog Button)
  • ShowDialog
    • Events
      • Unit - A unit enters (Entire map)
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to Wisp
    • Actions
      • -------- isMale thing --------
      • Unit - Kill (Triggering unit)
      • Dialog - Show dialog for (Triggering player)
  • SelectDialog
    • Events
      • Dialog - A dialog button is clicked for dialog
    • Conditions
    • Actions
      • Dialog - Hide dialog for (Triggering player)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Clicked dialog button) Equal to dialogButton[1]
        • Then - Actions
          • -------- Change to your male and female unit (Strength) --------
          • Unit - Create 1 Footman for (Triggering player) at (Center of (Playable map area)) facing Default building facing degrees
          • Unit - Create 1 Footman for (Triggering player) at (Center of (Playable map area)) facing Default building facing degrees
        • Else - Actions
      • -------- ---------------------------------------------------------------------------------------------------------------- --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Clicked dialog button) Equal to dialogButton[2]
        • Then - Actions
          • -------- Change to your male and female unit (Agility) --------
          • Unit - Create 1 Footman for (Triggering player) at (Center of (Playable map area)) facing Default building facing degrees
          • Unit - Create 1 Footman for (Triggering player) at (Center of (Playable map area)) facing Default building facing degrees
        • Else - Actions
      • -------- ---------------------------------------------------------------------------------------------------------------- --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Clicked dialog button) Equal to dialogButton[3]
        • Then - Actions
          • -------- Change to your male and female unit (Intelligence) --------
          • Unit - Create 1 Footman for (Triggering player) at (Center of (Playable map area)) facing Default building facing degrees
          • Unit - Create 1 Footman for (Triggering player) at (Center of (Playable map area)) facing Default building facing degrees
        • Else - Actions
 
Last edited:
Level 4
Joined
Dec 4, 2007
Messages
76
Well if two people try to get heroes at the same time wont the dialog mess up?

Just tested it, and it doesnt even show the dialog box when I enter near the circle of power.

-Edit #2-

Tested it again and found the problem, you can't create dialogs at map initialization so I changed to 1 second into game. I need to test it with 2 ppl now.. then I can tell if it works or not.
 
Last edited:

Dr Super Good

Spell Reviewer
Level 57
Joined
Jan 18, 2005
Messages
26,468
In that case eithor add a limate that it only works for hero at a time but that hero as 15 second to choose and it will not work for other people till the time is up or he chooses.

Or you simply make 12 dialogue objects, one for each player and display that player's dialogue.
 
Top