• Check out the results of the Techtree Contest #19!
  • 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.
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!

MB Semi-Working Challenge

Status
Not open for further replies.

sentrywiz

S

sentrywiz

I have 2 triggers, only for AR other for DRAFT.
They both select heroes in their own way and save vars.

Then I have create mb trigger. It runs on both triggers when
both of them are finished. The mb trigger works flawlessly for
the AR trigger but doesn't work quite as much for the DRAFT
trigger. It only selects me for the DRAFT trigger but not the
other players.

I have tested with game messages inside the mb trigger and
draft trigger. They both work. But its not displaying them at all.


  • Create MB
    • Events
    • Conditions
    • Actions
      • Multiboard - Create a multiboard with 5 columns and (3 + Player_Count) rows, titled (|c00DEDEDEWL|r |cffc3dbffPoW v1|r + Game_Type)
      • Multiboard - Set the text for (Last created multiboard) item in column 2, row 1 to Player
      • Multiboard - Set the text for (Last created multiboard) item in column 3, row 1 to K/D/C
      • Multiboard - Set the text for (Last created multiboard) item in column 4, row 1 to Timer
      • Multiboard - Set the text for (Last created multiboard) item in column 5, row 1 to Inv
      • Multiboard - Set the display style for (Last created multiboard) item in column 1, row 1 to Show text and Hide icons
      • Multiboard - Set the display style for (Last created multiboard) item in column 2, row 1 to Show text and Hide icons
      • Multiboard - Set the display style for (Last created multiboard) item in column 3, row 1 to Show text and Hide icons
      • Multiboard - Set the display style for (Last created multiboard) item in column 4, row 1 to Show text and Hide icons
      • Multiboard - Set the display style for (Last created multiboard) item in column 5, row 1 to Show text and Hide icons
      • Multiboard - Set the width for (Last created multiboard) item in column 1, row 1 to 2.00% of the total screen width
      • Multiboard - Set the width for (Last created multiboard) item in column 2, row 1 to 8.00% of the total screen width
      • Multiboard - Set the width for (Last created multiboard) item in column 3, row 1 to 4.00% of the total screen width
      • Multiboard - Set the width for (Last created multiboard) item in column 4, row 1 to 4.00% of the total screen width
      • Multiboard - Set the width for (Last created multiboard) item in column 5, row 1 to 6.00% of the total screen width
      • Multiboard - Set the display style for (Last created multiboard) item in column 1, row 2 to Hide text and Hide icons
      • Multiboard - Set the display style for (Last created multiboard) item in column 2, row 2 to Show text and Hide icons
      • Multiboard - Set the display style for (Last created multiboard) item in column 3, row 2 to Show text and Hide icons
      • Multiboard - Set the display style for (Last created multiboard) item in column 4, row 2 to Show text and Hide icons
      • Multiboard - Set the display style for (Last created multiboard) item in column 5, row 2 to Show text and Hide icons
      • Multiboard - Set the width for (Last created multiboard) item in column 1, row 2 to 2.00% of the total screen width
      • Multiboard - Set the width for (Last created multiboard) item in column 2, row 2 to 8.00% of the total screen width
      • Multiboard - Set the width for (Last created multiboard) item in column 3, row 2 to 4.00% of the total screen width
      • Multiboard - Set the width for (Last created multiboard) item in column 4, row 2 to 4.00% of the total screen width
      • Multiboard - Set the width for (Last created multiboard) item in column 5, row 2 to 6.00% of the total screen width
      • Multiboard - Set the text for (Last created multiboard) item in column 2, row 2 to |c00ff0000Red Team|...
      • Multiboard - Set the text for (Last created multiboard) item in column 3, row 2 to ((|c00ff0000 + ((String(RedKills)) + |r)) + <Empty String>)
      • Multiboard - Set the text for (Last created multiboard) item in column 4, row 2 to <Empty String>
      • Multiboard - Set the text for (Last created multiboard) item in column 5, row 2 to <Empty String>
      • Set MB_INT = 2
      • For each (Integer A) from 1 to 5, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Player[(Integer A)] slot status) Equal to Is playing
            • Then - Actions
              • Set MB_INT = (MB_INT + 1)
              • Multiboard - Set the display style for (Last created multiboard) item in column 1, row MB_INT to Hide text and Show icons
              • Multiboard - Set the display style for (Last created multiboard) item in column 2, row MB_INT to Show text and Hide icons
              • Multiboard - Set the display style for (Last created multiboard) item in column 3, row MB_INT to Show text and Hide icons
              • Multiboard - Set the display style for (Last created multiboard) item in column 4, row MB_INT to Show text and Hide icons
              • Multiboard - Set the display style for (Last created multiboard) item in column 5, row MB_INT to Show text and Hide icons
              • Multiboard - Set the width for (Last created multiboard) item in column 1, row MB_INT to 2.00% of the total screen width
              • Multiboard - Set the width for (Last created multiboard) item in column 2, row MB_INT to 8.00% of the total screen width
              • Multiboard - Set the width for (Last created multiboard) item in column 3, row MB_INT to 4.00% of the total screen width
              • Multiboard - Set the width for (Last created multiboard) item in column 4, row MB_INT to 4.00% of the total screen width
              • Multiboard - Set the width for (Last created multiboard) item in column 5, row MB_INT to 6.00% of the total screen width
              • Multiboard - Set the icon for (Last created multiboard) item in column 1, row MB_INT to Player_Hero_Icon[(Integer A)]
              • Multiboard - Set the text for (Last created multiboard) item in column 2, row MB_INT to (PlayerColors[(Integer A)] + ((Name of Player[(Integer A)]) + |r))
              • Multiboard - Set the text for (Last created multiboard) item in column 3, row MB_INT to ((String(Player_Kills[(Integer A)])) + (/ + ((String(Player_Deaths[(Integer A)])) + (/ + (String(Player_Creeps[(Integer A)]))))))
              • Multiboard - Set the text for (Last created multiboard) item in column 4, row MB_INT to |c00DEDEDEAlive|r
              • Multiboard - Set the text for (Last created multiboard) item in column 5, row MB_INT to 0
            • Else - Actions
      • Set MB_INT = (MB_INT + 1)
      • Multiboard - Set the text for (Last created multiboard) item in column 2, row MB_INT to |c000000ffBlue Team...
      • Multiboard - Set the text for (Last created multiboard) item in column 3, row MB_INT to ((|c000000ff + (String(BlueKills))) + |r)
      • Multiboard - Set the text for (Last created multiboard) item in column 4, row MB_INT to <Empty String>
      • Multiboard - Set the text for (Last created multiboard) item in column 5, row MB_INT to <Empty String>
      • Multiboard - Set the display style for (Last created multiboard) item in column 1, row MB_INT to Hide text and Hide icons
      • Multiboard - Set the display style for (Last created multiboard) item in column 2, row MB_INT to Show text and Hide icons
      • Multiboard - Set the display style for (Last created multiboard) item in column 3, row MB_INT to Show text and Hide icons
      • Multiboard - Set the display style for (Last created multiboard) item in column 4, row MB_INT to Show text and Hide icons
      • Multiboard - Set the display style for (Last created multiboard) item in column 5, row MB_INT to Show text and Hide icons
      • Multiboard - Set the width for (Last created multiboard) item in column 1, row MB_INT to 2.00% of the total screen width
      • Multiboard - Set the width for (Last created multiboard) item in column 2, row MB_INT to 8.00% of the total screen width
      • Multiboard - Set the width for (Last created multiboard) item in column 3, row MB_INT to 4.00% of the total screen width
      • Multiboard - Set the width for (Last created multiboard) item in column 4, row MB_INT to 4.00% of the total screen width
      • Multiboard - Set the width for (Last created multiboard) item in column 5, row MB_INT to 6.00% of the total screen width
      • For each (Integer A) from 6 to 10, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Player[(Integer A)] slot status) Equal to Is playing
            • Then - Actions
              • Set MB_INT = (MB_INT + 1)
              • Multiboard - Set the display style for (Last created multiboard) item in column 1, row MB_INT to Hide text and Show icons
              • Multiboard - Set the display style for (Last created multiboard) item in column 2, row MB_INT to Show text and Hide icons
              • Multiboard - Set the display style for (Last created multiboard) item in column 3, row MB_INT to Show text and Hide icons
              • Multiboard - Set the display style for (Last created multiboard) item in column 4, row MB_INT to Show text and Hide icons
              • Multiboard - Set the display style for (Last created multiboard) item in column 5, row MB_INT to Show text and Hide icons
              • Multiboard - Set the width for (Last created multiboard) item in column 1, row MB_INT to 2.00% of the total screen width
              • Multiboard - Set the width for (Last created multiboard) item in column 2, row MB_INT to 8.00% of the total screen width
              • Multiboard - Set the width for (Last created multiboard) item in column 3, row MB_INT to 4.00% of the total screen width
              • Multiboard - Set the width for (Last created multiboard) item in column 4, row MB_INT to 4.00% of the total screen width
              • Multiboard - Set the width for (Last created multiboard) item in column 5, row MB_INT to 6.00% of the total screen width
              • Multiboard - Set the icon for (Last created multiboard) item in column 1, row MB_INT to Player_Hero_Icon[(Integer A)]
              • Multiboard - Set the text for (Last created multiboard) item in column 2, row MB_INT to (PlayerColors[(Integer A)] + ((Name of Player[(Integer A)]) + |r))
              • Multiboard - Set the text for (Last created multiboard) item in column 3, row MB_INT to ((String(Player_Kills[(Integer A)])) + (/ + ((String(Player_Deaths[(Integer A)])) + (/ + (String(Player_Creeps[(Integer A)]))))))
              • Multiboard - Set the text for (Last created multiboard) item in column 4, row MB_INT to |c00DEDEDEAlive|r
              • Multiboard - Set the text for (Last created multiboard) item in column 5, row MB_INT to 0
            • Else - Actions
      • Multiboard - Show (Last created multiboard)



  • Command AR
    • Events
      • Player - Player 3 (Teal) types a chat message containing -ar as An exact match
    • Conditions
    • Actions
      • Custom script: call ClearTextMessages()
      • Trigger - Turn off Command DRAFT <gen>
      • Set Game_Type = AR
      • Game - Display to (All players) for 10.00 seconds the text: (PlayerColors[1] + ((Name of Player 3 (Teal)) + |r chose |cffffcc00AR|r |cffcccccc(All Players Get Random Hero)|r))
      • Wait 5.00 seconds
      • Trigger - Turn off (This trigger)
      • Player - Turn Gives bounty On for Player 1 (Red)
      • Player - Turn Gives bounty On for Player 2 (Blue)
      • For each (Integer A) from 1 to 10, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Player[(Integer A)] slot status) Equal to Is playing
            • Then - Actions
              • Set Random_Group = (Units in Select Hero <gen> matching ((((Matching unit) is A Hero) Equal to True) and ((Owner of (Matching unit)) Equal to Neutral Passive)))
              • Set Random_Unit = (Random unit from Random_Group)
              • Unit - Change ownership of Random_Unit to Player[(Integer A)] and Change color
              • Trigger - Run Hero Icon AR <gen> (ignoring conditions)
              • Game - Display to (All players) for 5.00 seconds the text: (PlayerColors[(Integer A)] + ((Name of Player[(Integer A)]) + (|r picked + (|c00A0C5D9 + ((Name of Random_Unit) + (|r |c00D8DE6F( + ((Proper name of Random_Unit) + )|r)))))))
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Random_Unit belongs to an ally of Player 1 (Red)) Equal to True
                • Then - Actions
                  • Unit - Kill VisionPlayer[(Integer A)]
                  • Unit - Move Random_Unit instantly to (Center of Red Team Rev <gen>)
                  • Unit - Make Random_Unit Vulnerable
                  • Selection - Select Random_Unit for Player[(Integer A)]
                  • Camera - Pan camera for Player[(Integer A)] to (Center of Red Team Rev <gen>) over 0.00 seconds
                  • Player - Turn Gives bounty On for Player[(Integer A)]
                  • Player - Add 600 to Player[(Integer A)] Current gold
                • Else - Actions
                  • Unit - Kill VisionPlayer[(Player number of Player[(Integer A)])]
                  • Unit - Move Random_Unit instantly to (Center of Blue Team Rev <gen>)
                  • Unit - Make Random_Unit Vulnerable
                  • Selection - Select Random_Unit for Player[(Integer A)]
                  • Camera - Pan camera for Player[(Integer A)] to (Center of Blue Team Rev <gen>) over 0.00 seconds
                  • Player - Turn Gives bounty On for Player[(Integer A)]
                  • Player - Add 600 to Player[(Integer A)] Current gold
              • Custom script: call DestroyGroup ( udg_Random_Group )
            • Else - Actions
      • Game - Display to (All players) for 10.00 seconds the text: Players have picked...
      • Trigger - Run First Spawn <gen> (ignoring conditions)
      • Trigger - Run Create MB <gen> (ignoring conditions)



  • Pick Hero DRAFT
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Pick Hero
      • (Casting unit) Equal to Hero Pick 0053 <gen>
    • Actions
      • Set Player_Count = (Player_Count - 1)
      • Set Player_Picked[Player_Picking] = True
      • Game - Display to (All players) for 5.00 seconds the text: (PlayerColors[Player_Picking] + ((Name of Player[Player_Picking]) + (|r picked + (|c00A0C5D9 + ((Name of (Target unit of ability being cast)) + (|r |c00D8DE6F( + ((Proper name of (Target unit of ability being cast)) + )|r)))))))
      • Unit - Change ownership of (Target unit of ability being cast) to (Owner of (Casting unit)) and Change color
      • Trigger - Run Hero Icon DRAFT <gen> (ignoring conditions)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Target unit of ability being cast) belongs to an ally of Player 1 (Red)) Equal to True
        • Then - Actions
          • Unit Group - Add (Target unit of ability being cast) to Red_Hero_Group
        • Else - Actions
          • Unit Group - Add (Target unit of ability being cast) to Blue_Hero_Group
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Player_Count Equal to 0
        • Then - Actions
          • Trigger - Turn off (This trigger)
          • Trigger - Run Create MB <gen> (ignoring conditions)
          • Game - Display to (All players) for 10.00 seconds the text: Players have picked...
          • Unit - Change ownership of Hero Pick 0053 <gen> to Neutral Passive and Change color
          • Unit Group - Pick every unit in Red_Hero_Group and do (Actions)
            • Loop - Actions
              • Unit - Kill VisionPlayer[(Player number of (Owner of (Picked unit)))]
              • Unit - Move (Picked unit) instantly to (Center of Red Team Rev <gen>)
              • Unit - Make (Picked unit) Vulnerable
              • Selection - Select (Picked unit) for (Owner of (Picked unit))
              • Camera - Pan camera for (Owner of (Picked unit)) to (Center of Red Team Rev <gen>) over 0.00 seconds
              • Player - Turn Gives bounty On for (Owner of (Picked unit))
              • Player - Add 600 to (Owner of (Picked unit)) Current gold
              • Player - Turn Gives bounty On for Player 1 (Red)
              • Player - Turn Gives bounty On for Player 2 (Blue)
              • Trigger - Run First Spawn <gen> (ignoring conditions)
          • Unit Group - Pick every unit in Blue_Hero_Group and do (Actions)
            • Loop - Actions
              • Unit - Kill VisionPlayer[(Player number of (Owner of (Picked unit)))]
              • Unit - Move (Picked unit) instantly to (Center of Blue Team Rev <gen>)
              • Unit - Make (Picked unit) Vulnerable
              • Selection - Select (Picked unit) for (Owner of (Picked unit))
              • Camera - Pan camera for (Owner of (Picked unit)) to (Center of Blue Team Rev <gen>) over 0.00 seconds
              • Player - Turn Gives bounty On for (Owner of (Picked unit))
              • Player - Add 600 to (Owner of (Picked unit)) Current gold
              • Player - Turn Gives bounty On for Player 1 (Red)
              • Player - Turn Gives bounty On for Player 2 (Blue)
              • Trigger - Run First Spawn <gen> (ignoring conditions)
        • Else - Actions
          • Trigger - Run DRAFT PLAYER PICK <gen> (ignoring conditions)
          • Game - Display to (All players) for 10.00 seconds the text: (PlayerColors[Player_Picking] + ((Name of Player[Player_Picking]) + |r's turn to pick a hero.))
          • Unit - Change ownership of Hero Pick 0053 <gen> to Player[Player_Picking] and Change color
          • Selection - Select Hero Pick 0053 <gen> for Player[Player_Picking]


TEST

I tested with me and 3 others computers in my team and 4 other computers on the other team.

AR TEST:

WL POW AR.jpg

DRAFT TEST:

WL POW DRAFT.jpg
 
Last edited by a moderator:
I would use a variable for Target unit for ability being cast since that event response is lost quite quickly by trigger.

Post a test map, or do some more debugging with game messages.

That variable is player_hero[owner of casting unit] = target unit of ability being cast. And I've already tested with game messages, no problem.

EDIT

The variable I mentioned isn't used anywhere but I've tested this with game variables and there is NO quick loss of variables like you said.
Target unit of ability being cast is always given to the right player and every player's unit is the correct one.
 
Last edited by a moderator:
Player_Hero[(Player number of (Owner of (Casting unit)))] isn't used for ITE and groups?

I just checked - I don't use it anywhere.
I am puzzled to why I created it, I must have found a purpose but have solved it later by not using it.

I'll remove it from the code and from the triggers here.
 
Status
Not open for further replies.
Back
Top