• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[Trigger] Problem with texts!

Status
Not open for further replies.
Level 15
Joined
Aug 11, 2009
Messages
1,606
I have this trigger in my map,but for some reason(s) it bugs.It shows the displayed message X times for X players...don't know why.Example there are 5 players in game,it will show in screen
Single Player Detected - Arena Disabled
Single Player Detected - Arena Disabled
MultiPlayer Detected -Arena Enabled
MultiPlayer Detected -Arena Enabled
MultiPlayer Detected -Arena Enabled

This is what exactly what it shows,why is this?I want it to just show Single player if there is only 1 player and Multiplayer if there are 2 or more players in the map.
  • Turn Arena On
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Player Group - Pick every player in (All players) and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • And - All (Conditions) are true
                • Conditions
                  • ((Picked player) controller) Equal to User
                  • (Player number of (Picked player)) Greater than or equal to 4
            • Then - Actions
              • Trigger - Turn on Arena <gen>
              • Trigger - Turn on Arena2 <gen>
              • Trigger - Turn on SetHeroGroups <gen>
              • Trigger - Turn on Display Arena <gen>
              • Game - Display to (All players) the text: |c00ff0303Multiplay...
            • Else - Actions
              • Game - Display to (All players) the text: |c00ff0303Single pl...
 
Level 6
Joined
Oct 31, 2008
Messages
229
Cause every time it checks a player, it writes it to All players. I assume you better put in a variable all the players owned by humans, and after that check if two at least are playing so it is multiplayer and then announce it
 
Level 12
Joined
Jul 27, 2008
Messages
1,181
Why use the "if all conditions are true"? Just put them there (in the if/then/else).

  • Turn Arena On
  • Events
    • Map initialization
  • Conditions
  • Actions
    • Player Group - Pick every player in (All players) and do (Actions)
    • Loop - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Picked player) controller) Equal to User
          • (Player number of (Picked player)) Greater than or equal to 4
        • Then - Actions
          • Set Players = Players + 1
        • Else
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • Players Greater than or Equal to 2
      • Then - Actions
        • Trigger - Turn on Arena <gen>
        • Trigger - Turn on Arena2 <gen>
        • Trigger - Turn on SetHeroGroups <gen>
        • Trigger - Turn on Display Arena <gen>
        • Game - Display to (All players) the text: |c00ff0303Multiplay...
      • Else - Actions
        • Game - Display to (All players) the text: |c00ff0303Single pl...
 
Level 15
Joined
Aug 11, 2009
Messages
1,606
Gonna try it,but anyway you both deserve +rep for your answers:) thx!
So this should be like it?
  • Turn Arena On Copy
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Player Group - Pick every player in (All players) and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • And - All (Conditions) are true
                • Conditions
                  • ((Picked player) controller) Equal to User
                  • (Player number of (Picked player)) Greater than or equal to 4
            • Then - Actions
              • Set PlayersArena = (PlayersArena + 1)
            • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • PlayersArena Greater than or equal to 2
        • Then - Actions
          • Trigger - Turn on Arena <gen>
          • Trigger - Turn on Arena2 <gen>
          • Trigger - Turn on SetHeroGroups <gen>
          • Trigger - Turn on Display Arena <gen>
          • Game - Display to (All players) the text: |c00ff0303Multiplay...
        • Else - Actions
          • Game - Display to (All players) the text: |c00ff0303Single pl...
With PlayersArena an Integer variable.
 
Last edited:
Level 15
Joined
Aug 11, 2009
Messages
1,606
like this?
  • Turn Arena On Copy
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Player Group - Pick every player in (All players) and do (Actions)
        • Loop - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • And - All (Conditions) are true
            • Conditions
              • ((Picked player) controller) Equal to User
              • (Player number of (Picked player)) Greater than or equal to 4
        • Then - Actions
          • Set PlayersArena = (PlayersArena + 1)
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • PlayersArena Greater than or equal to 2
        • Then - Actions
          • Trigger - Turn on Arena <gen>
          • Trigger - Turn on Arena2 <gen>
          • Trigger - Turn on SetHeroGroups <gen>
          • Trigger - Turn on Display Arena <gen>
          • Game - Display to (All players) the text: |c00ff0303Multiplay...
        • Else - Actions
          • Game - Display to (All players) the text: |c00ff0303Single pl...
 
Level 15
Joined
Aug 11, 2009
Messages
1,606
Ok,i think this one should be fine then...i got confused with all these:ugly:
  • Turn Arena On Copy2
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Player Group - Pick every player in (All players) and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Picked player) controller) Equal to User
              • (Player number of (Picked player)) Greater than or equal to 4
            • Then - Actions
              • Set PlayersArena = (PlayersArena + 1)
            • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • PlayersArena Greater than or equal to 2
        • Then - Actions
          • Trigger - Turn on Arena <gen>
          • Trigger - Turn on Arena2 <gen>
          • Trigger - Turn on SetHeroGroups <gen>
          • Trigger - Turn on Display Arena <gen>
          • Game - Display to (All players) the text: |c00ff0303Multiplay...
        • Else - Actions
          • Game - Display to (All players) the text: |c00ff0303Single pl...
So is this one ok?
 
Last edited:
Status
Not open for further replies.
Top