• 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 Problem

Status
Not open for further replies.
Level 13
Joined
Sep 25, 2013
Messages
717
So i've been using this additional resource system. Everything works fine except the multiboard doesn't work for multiple players. It is supposed to display how much of a resource each player has and only to that player. But for some reason it displays pretty random numbers when more than 1 player is playing. If i test the map by myself, it works fine.


  • OHS Display Config
    • Events
      • Map initialization
    • Conditions
    • Actions
      • -------- Set Oil icon for multiboard --------
      • Set OHS_DisplayOilIcon = ReplaceableTextures\CommandButtons\BTNChestOfGold.blp
      • -------- ------- --------
      • Wait 0.25 seconds
      • -------- Create board for every player. --------
      • -------- If you want to create for only one player, set tempId = that player's player number and run OHS Display Create Board --------
      • Player Group - Pick every player in (All players) and do (Actions)
        • Loop - Actions
          • Set tempId = (Player number of (Picked player))
          • Trigger - Run OHS Create Board <gen> (ignoring conditions)



  • OHS Create Board
    • Events
    • Conditions
    • Actions
      • Player Group - Add (Player(tempId)) to OHS_PlayersUsingDisplaySystem
      • Multiboard - Create a multiboard with 1 columns and 1 rows, titled Resources
      • Set OHS_Multiboard[tempId] = (Last created multiboard)
      • Multiboard - Set the icon for OHS_Multiboard[tempId] item in column 1, row 1 to OHS_DisplayOilIcon
      • Multiboard - Set the width for OHS_Multiboard[tempId] item in column 1, row 1 to 6.00% of the total screen width
      • Multiboard - Set the text for OHS_Multiboard[tempId] item in column 1, row 1 to 0
      • Multiboard - Hide OHS_Multiboard[tempId]
      • Multiboard - Show OHS_Multiboard[tempId]



  • OHS Update
    • Events
      • Time - Every 0.10 seconds of game time
    • Conditions
    • Actions
      • Player Group - Pick every player in OHS_PlayersUsingDisplaySystem and do (Actions)
        • Loop - Actions
          • Set tempId = (Player number of (Picked player))
          • Multiboard - Set the text for OHS_Multiboard[tempId] item in column 1, row 1 to (String(OHS_OilResource[tempId]))


It seems like the resource value being displayed for everyone is based off of one specific players resource value. Thanks for any help!
 
  • OHS Update
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • Player Group - Pick every player in OHS_PlayersUsingDisplaySystem and do (Actions)
        • Loop - Actions
          • Set tempId = (Player number of (Picked player))
          • Multiboard - Set the text for OHS_Multiboard[tempId] item in column 1, row 1 to (String(OHS_OilResource[tempId]))
          • Custom script: if GetLocalPlayer() == GetEnumPlayer() then
          • Multiboard - Show OHS_Multiboard[tempId]
          • Custom script: endif
 
Status
Not open for further replies.
Top