• 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] Multiboard Icons

Status
Not open for further replies.
Level 7
Joined
Mar 12, 2006
Messages
407
humm.. yeah if i actually had to trigger it i would do it like that:

  • icon definition
    • Events
    • Conditions
    • Actions
      • Set herotype[1] = Mountainking
      • Set herotype[2] = Bloodmage
      • Set herotype[3] = Paladin
      • Set symbolpath[1] = ReplaceableTextures\CommandButtons\BTNHeroMountainKing.blp
      • Set symbolpath[2] = ReplaceableTextures\CommandButtons\BTNHeroBloodElfPrince.blp
      • Set symbolpath[3] = ReplaceableTextures\CommandButtons\BTNHeroPaladin.blp
symbolpath is stringtype array var (strings taken from object editor)

  • multiboard icon set
    • Events
    • Conditions
    • Actions
      • Do Multiple ActionsFor each (Integer B) from 1 to 12, do (Actions)
        • Loop - Actions
          • Do Multiple ActionsFor each (Integer A) from 1 to 3, do (Actions)
            • Loop - Actions
              • Set group = (Units in (Playable map area) matching (((Matching unit) is a Hero) equal (==) True))
              • Unitgroup - Pick every unit in group and do (Actions)
                • Loop - Actions
                  • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • 'IF'-Conditions
                      • (Unit-type of (Picked unit)) equal (==) herotype[(Integer A)]
                    • 'THEN'-Actions
                      • Set group2 = (Units in (Playable map area) matching (((((Matching unit) is in group) equal (==) True) and (((Matching unit) is in (Units in (Playable map area) owned by (Player((Integer B))))) Gleich (==) True)) and ((Unit-type of (Matching unit)) equal (==) herotype[(Integer A)]
                      • Multiboard - Set the icon for multiboard item in column 1, row (Player number of (Owner of (Random unit from group2))) to symbolpath[(Integer A)]
                      • Custom script: call DestroyGroup (udg_group2)
                    • 'ELSE'-Actions
              • Custom script: call DestroyGroup (udg_group)
Loop A is 1 to 3 cuz first trigger only has 3 defined heroes
Loop B depends on number of players i just assumed 12 because its the usual number for Aos n stuff
Icon is set at playernumbers row, means player 3 hero icon will be shown in row 3 , you can change that of course ;)
Execute the second trigger when all players selected their hero
First trigger can be included in map init
 
Status
Not open for further replies.
Top