• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!

[Trigger] Dialog Problems!

Status
Not open for further replies.
Level 12
Joined
Apr 26, 2008
Messages
830
Somehow it only shows the button and the dialog to player red, but it doesn't appear for other player why is it ?!

here is the trigger:

  • ManOrWoman
    • Ereignisse
      • Map initialization
    • Bedingungen
    • Aktionen
      • Wait 2.00 seconds
      • -------- Player 1 --------
      • Dialog - Change the title of DialogManOrWomand[1] to Are you a Boy or a ...
      • Dialog - Create a dialog button for DialogManOrWomand[1] labelled Boy
      • Set Button[1] = (Last created dialog Button)
      • Dialog - Create a dialog button for DialogManOrWomand[1] labelled Girl
      • Set Button[2] = (Last created dialog Button)
      • Dialog - Zeigen DialogManOrWomand[1] for Spieler 1 (Rot)
      • -------- Player 2 --------
      • Dialog - Change the title of DialogManOrWomand[2] to Are you a Boy or a ...
      • Dialog - Create a dialog button for DialogManOrWomand[2] labelled Boy
      • Set Button[3] = (Last created dialog Button)
      • Dialog - Create a dialog button for DialogManOrWomand[2] labelled Girl
      • Set Button[4] = (Last created dialog Button)
      • Dialog - Zeigen DialogManOrWomand[2] for Spieler 2 (Blau)
      • -------- Player 3 --------
      • Dialog - Change the title of DialogManOrWomand[3] to Are you a Boy or a ...
      • Dialog - Create a dialog button for DialogManOrWomand[3] labelled Boy
      • Set Button[5] = (Last created dialog Button)
      • Dialog - Create a dialog button for DialogManOrWomand[3] labelled Girl
      • Set Button[6] = (Last created dialog Button)
      • Dialog - Zeigen DialogManOrWomand[3] for Spieler 3 (Blaugrau)
      • -------- Player 4 --------
      • Dialog - Change the title of DialogManOrWomand[4] to Are you a Boy or a ...
      • Dialog - Create a dialog button for DialogManOrWomand[4] labelled Boy
      • Set Button[7] = (Last created dialog Button)
      • Dialog - Create a dialog button for DialogManOrWomand[4] labelled Girl
      • Set Button[8] = (Last created dialog Button)
      • Dialog - Zeigen DialogManOrWomand[4] for Spieler 4 (Lila)
      • -------- Player 5 --------
      • Dialog - Change the title of DialogManOrWomand[5] to Are you a Boy or a ...
      • Dialog - Create a dialog button for DialogManOrWomand[5] labelled Boy
      • Set Button[9] = (Last created dialog Button)
      • Dialog - Create a dialog button for DialogManOrWomand[5] labelled Girl
      • Set Button[10] = (Last created dialog Button)
      • Dialog - Zeigen DialogManOrWomand[5] for Spieler 5 (Gelb)
      • -------- Player 6 --------
      • Dialog - Change the title of DialogManOrWomand[6] to Are you a Boy or a ...
      • Dialog - Create a dialog button for DialogManOrWomand[6] labelled Boy
      • Set Button[11] = (Last created dialog Button)
      • Dialog - Create a dialog button for DialogManOrWomand[6] labelled Girl
      • Set Button[12] = (Last created dialog Button)
      • Dialog - Zeigen DialogManOrWomand[6] for Spieler 6 (Orange)
      • -------- Player 7 --------
      • Dialog - Change the title of DialogManOrWomand[7] to Are you a Boy or a ...
      • Dialog - Create a dialog button for DialogManOrWomand[7] labelled Boy
      • Set Button[13] = (Last created dialog Button)
      • Dialog - Create a dialog button for DialogManOrWomand[7] labelled Girl
      • Set Button[14] = (Last created dialog Button)
      • Dialog - Zeigen DialogManOrWomand[7] for Spieler 7 (Grün)
      • -------- Player 8 --------
      • Dialog - Change the title of DialogManOrWomand[8] to Are you a Boy or a ...
      • Dialog - Create a dialog button for DialogManOrWomand[8] labelled Boy
      • Set Button[15] = (Last created dialog Button)
      • Dialog - Create a dialog button for DialogManOrWomand[8] labelled Girl
      • Set Button[16] = (Last created dialog Button)
      • Dialog - Zeigen DialogManOrWomand[8] for Spieler 8 (Rosa)
      • -------- Player 9 --------
      • Dialog - Change the title of DialogManOrWomand[9] to Are you a Boy or a ...
      • Dialog - Create a dialog button for DialogManOrWomand[9] labelled Boy
      • Set Button[17] = (Last created dialog Button)
      • Dialog - Create a dialog button for DialogManOrWomand[9] labelled Girl
      • Set Button[18] = (Last created dialog Button)
      • Dialog - Zeigen DialogManOrWomand[9] for Spieler 9 (Grau)
      • -------- Player 10 --------
      • Dialog - Change the title of DialogManOrWomand[10] to Are you a Boy or a ...
      • Dialog - Create a dialog button for DialogManOrWomand[10] labelled Boy
      • Set Button[19] = (Last created dialog Button)
      • Dialog - Create a dialog button for DialogManOrWomand[10] labelled Girl
      • Set Button[20] = (Last created dialog Button)
      • Dialog - Zeigen DialogManOrWomand[10] for Spieler 10 (Hellblau)
  • Create Trainer
    • Ereignisse
      • Dialog - A dialog button is clicked for DialogManOrWomand[1]
      • Dialog - A dialog button is clicked for DialogManOrWomand[2]
      • Dialog - A dialog button is clicked for DialogManOrWomand[3]
      • Dialog - A dialog button is clicked for DialogManOrWomand[4]
      • Dialog - A dialog button is clicked for DialogManOrWomand[5]
      • Dialog - A dialog button is clicked for DialogManOrWomand[6]
      • Dialog - A dialog button is clicked for DialogManOrWomand[7]
      • Dialog - A dialog button is clicked for DialogManOrWomand[8]
      • Dialog - A dialog button is clicked for DialogManOrWomand[9]
      • Dialog - A dialog button is clicked for DialogManOrWomand[10]
    • Bedingungen
    • Aktionen
      • Sound - Set music volume to 100.00%
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • 'IF'-Bedingungen
          • (Clicked dialog button) Gleich Button[1]
        • 'THEN'-Aktionen
          • Set ZTriggeringPlayer[1] = (Triggering player)
          • Einheit - Create 1 Myself Boy for Spieler 1 (Rot) at (Center of TrainerSpawn1 <gen>) facing Vorgabe für Gebäude-Ausrichtung degrees
          • Set PlayerTrainer[1] = (Last created unit)
          • Spiel - Display to Spielergruppe - Spieler 1 (Rot) for 10.00 seconds the text: |c00ffff00Welcome t...
          • Kamera - Pan camera for (Triggering player) to (Center of TrainerSpawn1 <gen>) over 0.00 seconds
          • Video - Einblenden over 2.00 seconds using texture Schwarze Maske and color (0.00%, 0.00%, 0.00%) with 0.00% transparency
          • Spiel - Unpause the game
        • 'ELSE'-Aktionen
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • 'IF'-Bedingungen
              • (Clicked dialog button) Gleich Button[2]
            • 'THEN'-Aktionen
              • Einheit - Create 1 Myself Girl for Spieler 1 (Rot) at (Center of TrainerSpawn1 <gen>) facing Vorgabe für Gebäude-Ausrichtung degrees
              • Set PlayerTrainer[1] = (Last created unit)
              • Spiel - Display to Spielergruppe - Spieler 1 (Rot) for 10.00 seconds the text: |c00ffff00Welcome t...
              • Kamera - Pan camera for (Triggering player) to (Center of TrainerSpawn1 <gen>) over 0.00 seconds
              • Video - Einblenden over 2.00 seconds using texture Schwarze Maske and color (0.00%, 0.00%, 0.00%) with 0.00% transparency
              • Spiel - Unpause the game
            • 'ELSE'-Aktionen
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • 'IF'-Bedingungen
          • (Clicked dialog button) Gleich Button[3]
        • 'THEN'-Aktionen
          • Einheit - Create 1 Myself Boy for Spieler 2 (Blau) at (Center of TrainerSpawn2 <gen>) facing Vorgabe für Gebäude-Ausrichtung degrees
          • Spiel - Display to Spielergruppe - Spieler 2 (Blau) for 10.00 seconds the text: |c00ffff00Welcome t...
        • 'ELSE'-Aktionen
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • 'IF'-Bedingungen
              • (Clicked dialog button) Gleich Button[4]
            • 'THEN'-Aktionen
              • Einheit - Create 1 Myself Girl for Spieler 2 (Blau) at (Center of TrainerSpawn2 <gen>) facing Vorgabe für Gebäude-Ausrichtung degrees
              • Spiel - Display to Spielergruppe - Spieler 2 (Blau) for 10.00 seconds the text: |c00ffff00Welcome t...
            • 'ELSE'-Aktionen
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • 'IF'-Bedingungen
          • (Clicked dialog button) Gleich Button[5]
        • 'THEN'-Aktionen
          • Einheit - Create 1 Myself Boy for Spieler 3 (Blaugrau) at (Center of TrainerSpawn1 <gen>) facing Vorgabe für Gebäude-Ausrichtung degrees
          • Spiel - Display to Spielergruppe - Spieler 3 (Blaugrau) for 10.00 seconds the text: |c00ffff00Welcome t...
        • 'ELSE'-Aktionen
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • 'IF'-Bedingungen
              • (Clicked dialog button) Gleich Button[6]
            • 'THEN'-Aktionen
              • Einheit - Create 1 Myself Girl for Spieler 3 (Blaugrau) at (Center of TrainerSpawn1 <gen>) facing Vorgabe für Gebäude-Ausrichtung degrees
              • Spiel - Display to Spielergruppe - Spieler 3 (Blaugrau) for 10.00 seconds the text: |c00ffff00Welcome t...
            • 'ELSE'-Aktionen
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • 'IF'-Bedingungen
          • (Clicked dialog button) Gleich Button[7]
        • 'THEN'-Aktionen
          • Einheit - Create 1 Myself Boy for Spieler 4 (Lila) at (Center of TrainerSpawn2 <gen>) facing Vorgabe für Gebäude-Ausrichtung degrees
          • Spiel - Display to Spielergruppe - Spieler 4 (Lila) for 10.00 seconds the text: |c00ffff00Welcome t...
        • 'ELSE'-Aktionen
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • 'IF'-Bedingungen
              • (Clicked dialog button) Gleich Button[8]
            • 'THEN'-Aktionen
              • Einheit - Create 1 Myself Girl for Spieler 4 (Lila) at (Center of TrainerSpawn2 <gen>) facing Vorgabe für Gebäude-Ausrichtung degrees
              • Spiel - Display to Spielergruppe - Spieler 4 (Lila) for 10.00 seconds the text: |c00ffff00Welcome t...
            • 'ELSE'-Aktionen
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • 'IF'-Bedingungen
          • (Clicked dialog button) Gleich Button[9]
        • 'THEN'-Aktionen
          • Einheit - Create 1 Myself Boy for Spieler 5 (Gelb) at (Center of TrainerSpawn1 <gen>) facing Vorgabe für Gebäude-Ausrichtung degrees
          • Spiel - Display to Spielergruppe - Spieler 5 (Gelb) for 10.00 seconds the text: |c00ffff00Welcome t...
        • 'ELSE'-Aktionen
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • 'IF'-Bedingungen
              • (Clicked dialog button) Gleich Button[10]
            • 'THEN'-Aktionen
              • Einheit - Create 1 Myself Girl for Spieler 5 (Gelb) at (Center of TrainerSpawn1 <gen>) facing Vorgabe für Gebäude-Ausrichtung degrees
              • Spiel - Display to Spielergruppe - Spieler 5 (Gelb) for 10.00 seconds the text: |c00ffff00Welcome t...
            • 'ELSE'-Aktionen
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • 'IF'-Bedingungen
          • (Clicked dialog button) Gleich Button[11]
        • 'THEN'-Aktionen
          • Einheit - Create 1 Myself Boy for Spieler 6 (Orange) at (Center of TrainerSpawn2 <gen>) facing Vorgabe für Gebäude-Ausrichtung degrees
          • Spiel - Display to Spielergruppe - Spieler 6 (Orange) for 10.00 seconds the text: |c00ffff00Welcome t...
        • 'ELSE'-Aktionen
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • 'IF'-Bedingungen
              • (Clicked dialog button) Gleich Button[12]
            • 'THEN'-Aktionen
              • Einheit - Create 1 Myself Girl for Spieler 6 (Orange) at (Center of TrainerSpawn2 <gen>) facing Vorgabe für Gebäude-Ausrichtung degrees
              • Spiel - Display to Spielergruppe - Spieler 6 (Orange) for 10.00 seconds the text: |c00ffff00Welcome t...
            • 'ELSE'-Aktionen
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • 'IF'-Bedingungen
          • (Clicked dialog button) Gleich Button[13]
        • 'THEN'-Aktionen
          • Einheit - Create 1 Myself Boy for Spieler 7 (Grün) at (Center of TrainerSpawn1 <gen>) facing Vorgabe für Gebäude-Ausrichtung degrees
          • Spiel - Display to Spielergruppe - Spieler 7 (Grün) for 10.00 seconds the text: |c00ffff00Welcome t...
        • 'ELSE'-Aktionen
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • 'IF'-Bedingungen
              • (Clicked dialog button) Gleich Button[14]
            • 'THEN'-Aktionen
              • Einheit - Create 1 Myself Girl for Spieler 7 (Grün) at (Center of TrainerSpawn1 <gen>) facing Vorgabe für Gebäude-Ausrichtung degrees
              • Spiel - Display to Spielergruppe - Spieler 7 (Grün) for 10.00 seconds the text: |c00ffff00Welcome t...
            • 'ELSE'-Aktionen
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • 'IF'-Bedingungen
          • (Clicked dialog button) Gleich Button[15]
        • 'THEN'-Aktionen
          • Einheit - Create 1 Myself Boy for Spieler 8 (Rosa) at (Center of TrainerSpawn2 <gen>) facing Vorgabe für Gebäude-Ausrichtung degrees
          • Spiel - Display to Spielergruppe - Spieler 8 (Rosa) for 10.00 seconds the text: |c00ffff00Welcome t...
        • 'ELSE'-Aktionen
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • 'IF'-Bedingungen
              • (Clicked dialog button) Gleich Button[16]
            • 'THEN'-Aktionen
              • Einheit - Create 1 Myself Girl for Spieler 8 (Rosa) at (Center of TrainerSpawn2 <gen>) facing Vorgabe für Gebäude-Ausrichtung degrees
              • Spiel - Display to Spielergruppe - Spieler 8 (Rosa) for 10.00 seconds the text: |c00ffff00Welcome t...
            • 'ELSE'-Aktionen
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • 'IF'-Bedingungen
          • (Clicked dialog button) Gleich Button[17]
        • 'THEN'-Aktionen
          • Einheit - Create 1 Myself Boy for Spieler 9 (Grau) at (Center of TrainerSpawn1 <gen>) facing Vorgabe für Gebäude-Ausrichtung degrees
          • Spiel - Display to Spielergruppe - Spieler 9 (Grau) for 10.00 seconds the text: |c00ffff00Welcome t...
        • 'ELSE'-Aktionen
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • 'IF'-Bedingungen
              • (Clicked dialog button) Gleich Button[18]
            • 'THEN'-Aktionen
              • Einheit - Create 1 Myself Girl for Spieler 9 (Grau) at (Center of TrainerSpawn1 <gen>) facing Vorgabe für Gebäude-Ausrichtung degrees
              • Spiel - Display to Spielergruppe - Spieler 9 (Grau) for 10.00 seconds the text: |c00ffff00Welcome t...
            • 'ELSE'-Aktionen
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • 'IF'-Bedingungen
          • (Clicked dialog button) Gleich Button[19]
        • 'THEN'-Aktionen
          • Einheit - Create 1 Myself Boy for Spieler 10 (Hellblau) at (Center of TrainerSpawn2 <gen>) facing Vorgabe für Gebäude-Ausrichtung degrees
          • Spiel - Display to Spielergruppe - Spieler 10 (Hellblau) for 10.00 seconds the text: |c00ffff00Welcome t...
        • 'ELSE'-Aktionen
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • 'IF'-Bedingungen
              • (Clicked dialog button) Gleich Button[20]
            • 'THEN'-Aktionen
              • Einheit - Create 1 Myself Girl for Spieler 10 (Hellblau) at (Center of TrainerSpawn2 <gen>) facing Vorgabe für Gebäude-Ausrichtung degrees
              • Spiel - Display to Spielergruppe - Spieler 10 (Hellblau) for 10.00 seconds the text: |c00ffff00Welcome t...
            • 'ELSE'-Aktionen
 
Level 20
Joined
Jul 14, 2011
Messages
3,213
The first trigger (Map Initialization) begins using variables " DialogManOrWomand[1]", and where did you gave those variables a value?

BTW; there's an efficient way to do your triggers without having to be so repetitive. Just one generic function inside a loop and you're done.
 
Level 12
Joined
Apr 26, 2008
Messages
830
The first trigger (Map Initialization) begins using variables " DialogManOrWomand[1]", and where did you gave those variables a value?

BTW; there's an efficient way to do your triggers without having to be so repetitive. Just one generic function inside a loop and you're done.

Don't understand what you mean, it should create a dialog for every player i think? and about the loop can you show me how?
 
Level 20
Joined
Jul 14, 2011
Messages
3,213
Whenever you need a repetitive action (Do the same thing but for a different player, or unit) you use a LOOP like "Pick every player" or "For each integer A" or "Pick Every Unit", etc.

This is your trigger repeated once for each player
  • Dialog - Change the title of DialogManOrWomand[1] to Are you a Boy or a ...
  • Dialog - Create a dialog button for DialogManOrWomand[1] labelled Boy
  • Set Button[1] = (Last created dialog Button)
  • Dialog - Create a dialog button for DialogManOrWomand[1] labelled Girl
  • Set Button[2] = (Last created dialog Button)
  • Dialog - Zeigen DialogManOrWomand[1] for Spieler 1 (Rot)
This a loop. It will run for value 1, 2, 3, 4, 5, 6, 7, 8, 9 10, and you can use those values inside using [(Integer A)]. "in" is an integer value I used to give the buttons array the correct value, since it's values are different than (Integer A). What happens is that when the Loop runs for "1", "in" is equal to 0, so "set in = (in + 1) means (0 + 1). But the second time, "in = 1", and we do "1 + 1", and so on. This simple loop works the same way all the things you repeated on first trigger for each player. We optimize the trigger saving the current value of Integer A into a variable, so the game doesn't have to look for it each time you need to use it.
  • Actions
    • For each (Integer A) from 1 to 10, do (Actions)
      • Loop - Actions
        • Set in2 = (Integer A)
        • Set in = (in + 1)
        • Dialog - Change the title of DialogManOrWomand[in2] to Are you a Boy or...
        • Dialog - Create a dialog button for DialogManOrWomand[in2] labelled Boy
        • Set Button[in] = (Last created dialog Button)
        • Set in = (in + 1)
        • Dialog - Create a dialog button for DialogManOrWomand[in2] labelled Boy
        • Set Button[in] = (Last created dialog Button)
        • Dialog - Show DialogManOrWomand[in2] for (Player(in2))
This is your second trigger. I'm having problems to find the way to set the points correctly based on regions.

  • Actions
    • Set Player = (Triggering player)
    • Set in = (Player number of Player)
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • Or - Any (Conditions) are true
          • Conditions
            • in Equal to 1
            • in Equal to 3
            • in Equal to 5
            • in Equal to 7
            • in Equal to 9
      • Then - Actions
        • Set Point = (Center of TeamSpawn1)
      • Else - Actions
        • Set Point = (Center of TeamSpawn2)
    • Set in2 = 0
    • Set PlayerGroup = (Player group(Player))
    • For each (Integer A) from 1 to 10, do (Actions)
      • Loop - Actions
        • Set in2 = (in2 + 1)
        • Game - Display to PlayerGroup the text: Bla bla bla
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • (Clicked dialog button) Equal to Button[in2]
          • Then - Actions
            • Unit - Create 1 Footman for Player at Point facing Default building facing degrees
            • Set PlayerTrainer[in] = (Last created unit)
          • Else - Actions
            • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              • If - Conditions
                • (Clicked dialog button) Equal to Button[(in2 + 1)]
              • Then - Actions
                • Unit - Create 1 Footman for Player at Point facing Default building facing degrees
                • Set PlayerTrainer[in] = (Last created unit)
              • Else - Actions
        • Set in2 = (in2 + 1)
    • Camera - Pan camera for Player to Point over 0.00 seconds
    • Game - Unpause the game
    • Custom script: call RemoveLocation(udg_Point)
    • Custom script: call DestroyForce(udg_PlayerGroup)
You have to put order in your triggers and system. You create player 1, 3, 5, 7, 9 in CenterSpawn1, and player 2, 4, 6, 8 10 in CenterSpawn2. It really messes up my mind. You also have 1, 3, 5, 7, 9, 11, 13, 15, 17, 19 for Male Units, and 2, 4, 6, 8, 10, 12, 14, 16, 18, 20 for Female units.

You should set Male Units for 1 2 3 4 5 6 7 8 9 10, and Female Units as 11 12 13 14 15 17 18 19 20.
Also, create Players 1 2 3 4 5 In CenterSpawn1 and Players 6 7 8 9 10 in CenterSpawn 2.

As you see, it's a lot more "simpler" and has more order, and it's easier to configurate into a loop formula.

So far, this is just my point of view. I still was able to configurate your trigger as it's inside an efficient loop, but it could be improved a lot if you put some logic order into the whole basis of your systems.

It may be hard to believe, but all that variables and If/Then/Else and loops are more efficient and easier to do than your Copy/paste and data change for each player :p
 
Last edited:
Level 12
Joined
Apr 26, 2008
Messages
830
Whenever you need a repetitive action (Do the same thing but for a different player, or unit) you use a LOOP like "Pick every player" or "For each integer A" or "Pick Every Unit", etc.

This is your trigger repeated once for each player
  • Dialog - Change the title of DialogManOrWomand[1] to Are you a Boy or a ...
  • Dialog - Create a dialog button for DialogManOrWomand[1] labelled Boy
  • Set Button[1] = (Last created dialog Button)
  • Dialog - Create a dialog button for DialogManOrWomand[1] labelled Girl
  • Set Button[2] = (Last created dialog Button)
  • Dialog - Zeigen DialogManOrWomand[1] for Spieler 1 (Rot)
This a loop. It will run for value 1, 2, 3, 4, 5, 6, 7, 8, 9 10, and you can use those values inside using [(Integer A)]. "in" is an integer value I used to give the buttons array the correct value, since it's values are different than (Integer A). What happens is that when the Loop runs for "1", "in" is equal to 0, so "set in = (in + 1) means (0 + 1). But the second time, "in = 1", and we do "1 + 1", and so on. This simple loop works the same way all the things you repeated on first trigger for each player. We optimize the trigger saving the current value of Integer A into a variable, so the game doesn't have to look for it each time you need to use it.
  • Actions
    • For each (Integer A) from 1 to 10, do (Actions)
      • Loop - Actions
        • Set in2 = (Integer A)
        • Set in = (in + 1)
        • Dialog - Change the title of DialogManOrWomand[in2] to Are you a Boy or...
        • Dialog - Create a dialog button for DialogManOrWomand[in2] labelled Boy
        • Set Button[in] = (Clicked dialog button)
        • Set in = (in + 1)
        • Dialog - Create a dialog button for DialogManOrWomand[in2] labelled Boy
        • Set Button[in] = (Clicked dialog button)
        • Dialog - Show DialogManOrWomand[in2] for (Player(in2))
This is your second trigger. I'm having problems to find the way to set the points correctly based on regions.

  • Actions
    • Set in2 = 0
    • Set Player = (Triggering player)
    • Set in = (Player number of Player)
    • Set PlayerGroup = (Player group(Player))
    • Set Regions[1] = Center of Trainer Spawn1 <gen>
    • Set Point = (Center of Regions[in])
    • Game - Unpause the game
    • For each (Integer A) from 1 to 10, do (Actions)
      • Loop - Actions
        • Set in2 = (in2 + 1)
        • Game - Display to PlayerGroup the text: Bla bla bla
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • (Clicked dialog button) Equal to Button[in2]
          • Then - Actions
            • Unit - Create 1 Footman for Player at Point facing Default building facing degrees
            • Set PlayerTrainer[in] = (Last created unit)
          • Else - Actions
            • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              • If - Conditions
                • (Clicked dialog button) Equal to Button[(in2 + 1)]
              • Then - Actions
                • Unit - Create 1 Footman for Player at Point facing Default building facing degrees
                • Set PlayerTrainer[in] = (Last created unit)
              • Else - Actions
        • Camera - Pan camera for Player to Point over 0.00 seconds
        • Set in2 = (in2 + 1)
You have to put order in your triggers and system. You create player 1, 3, 5, 7, 9 in CenterSpawn1, and player 2, 4, 6, 8 10 in CenterSpawn2. It really messes up my mind. You also have 1, 3, 5, 7, 9, 11, 13, 15, 17, 19 for Male Units, and 2, 4, 6, 8, 10, 12, 14, 16, 18, 20 for Female units.

You should set Male Units for 1 2 3 4 5 6 7 8 9 10, and Female Units as 11 12 13 14 15 17 18 19 20.
Also, create Players 1 2 3 4 5 In CenterSpawn1 and Players 6 7 8 9 10 in CenterSpawn 2.

As you see, it's a lot more "simpler" and has more order, and it's easier to configurate into a loop formula.

But in my trigger it should show eveyr player right? but it doesnt why is that?
 
Level 20
Joined
Jul 14, 2011
Messages
3,213
I'm not sure why, but try to force the "show" for every player. Add this action inside the first trigger loop
  • Dialog - Show DialogManOrWomand[in2] for (Player(in2))
Like this

  • For each (Integer A) from 1 to 10, do (Actions)
    • Loop - Actions
      • Set in2 = (Integer A)
      • Dialog - Show DialogManOrWomand[in2] for (Player(in2)) <-----------
      • Set in = (in + 1)
      • Dialog - Change the title of DialogManOrWomand[in2] to Are you a Boy or...
      • Dialog - Create a dialog button for DialogManOrWomand[in2] labelled Boy
      • Set Button[in] = (Clicked dialog button)
      • Set in = (in + 1)
      • Dialog - Create a dialog button for DialogManOrWomand[in2] labelled Boy
      • Set Button[in] = (Clicked dialog button)
      • Dialog - Show DialogManOrWomand[in2] for (Player(in2))
 
Status
Not open for further replies.
Top