Action when region is empty?

AaronPwner

Member
Reaction score
0
I can't seem to make it work, I tried making a AllPlayers Player Array (You can't use playergroups when using visibility mods) as I want to turn off visibility for the selection area when all players have finished selecting a hero.

Trigger:
  • VisibilityHSelect
    • Events
      • Map initialization
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (SelectionArea <gen> contains Soul 0000 <gen>) Equal to True
          • Or - Any (Conditions) are true
            • Conditions
              • (SelectionArea <gen> contains Soul 0001 <gen>) Equal to True
              • Or - Any (Conditions) are true
                • Conditions
                  • (SelectionArea <gen> contains Soul 0003 <gen>) Equal to True
                  • Or - Any (Conditions) are true
                    • Conditions
                      • (SelectionArea <gen> contains Soul 0004 <gen>) Equal to True
        • Then - Actions
          • Visibility - Enable HeroSelectionVisibilityMod[(Integer A)]
        • Else - Actions
          • Visibility - Disable HeroSelectionVisibilityMod[(Integer A)]


Trigger:
  • VisibilityHSelectSetup
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Set AllPlayer[1] = Player 1 (Red)
      • Set AllPlayer[2] = Player 2 (Blue)
      • Set AllPlayer[3] = Player 6 (Orange)
      • Set AllPlayer[4] = Player 7 (Green)
      • Visibility - Create an initially Enabled visibility modifier for AllPlayer[(Integer A)] emitting Visibility across HSelectVis1 <gen>
      • Set HeroSelectionVisibilityMod[1] = (Last created visibility modifier)
      • Visibility - Create an initially Enabled visibility modifier for AllPlayer[(Integer A)] emitting Visibility across HSelectVis2 <gen>
      • Set HeroSelectionVisibilityMod[2] = (Last created visibility modifier)
      • Visibility - Create an initially Enabled visibility modifier for AllPlayer[(Integer A)] emitting Visibility across HSelectVis3 <gen>
      • Set HeroSelectionVisibilityMod[3] = (Last created visibility modifier)
      • Visibility - Create an initially Enabled visibility modifier for AllPlayer[(Integer A)] emitting Visibility across HSelectVis4 <gen>
      • Set HeroSelectionVisibilityMod[4] = (Last created visibility modifier)
      • Visibility - Create an initially Enabled visibility modifier for AllPlayer[(Integer A)] emitting Visibility across HSelectVis5 <gen>
      • Set HeroSelectionVisibilityMod[5] = (Last created visibility modifier)
      • Visibility - Create an initially Enabled visibility modifier for AllPlayer[(Integer A)] emitting Visibility across HSelectVis6 <gen>
      • Set HeroSelectionVisibilityMod[6] = (Last created visibility modifier)
      • Visibility - Create an initially Enabled visibility modifier for AllPlayer[(Integer A)] emitting Visibility across HSelectVis7 <gen>
      • Set HeroSelectionVisibilityMod[7] = (Last created visibility modifier)
 

Skully

New Member
Reaction score
1
I'm not too good with visibility stuff and all that but maybe make a dummy unit that either leaves (and use when unit leaves region) or enters (and use when unit enters region) that causes visibility to go change? Make it so the dummy is created or leaves after all players choose their heroes.

(unit enters region [the dummy] - change visibilty for [all players])
 

Komaqtion

You can change this now in User CP.
Reaction score
469
In your first trigger there, there is no Integer A, as you're not using a loop...
Code:
Visibility - Enable HeroSelectionVisibilityMod[[COLOR="Red"](Integer A)[/COLOR]]

Will not work then ;)

So, your first trigger should look like this:
Trigger:
  • VisibilityHSelect
    • Events
      • Map initialization
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Or - Any (Conditions) are true
            • Conditions
              • (SelectionArea <gen> contains Soul 0000 <gen>) Equal to True
              • (SelectionArea <gen> contains Soul 0001 <gen>) Equal to True
              • (SelectionArea <gen> contains Soul 0003 <gen>) Equal to True
              • (SelectionArea <gen> contains Soul 0004 <gen>) Equal to True
        • Then - Actions
          • For each (Integer A) from 1 to 12, do (Actions)
            • Loop - Actions
              • Visibility - Enable HeroSelectionVisibilityMod[(Integer A)]
        • Else - Actions
          • For each (Integer A) from 1 to 12, do (Actions)
            • Loop - Actions
              • Visibility - Disable HeroSelectionVisibilityMod[(Integer A)]


(Note: This is freehanded...)

Same, with the integer a loop stuff) goes for your second 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