• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

[Trigger] Multiboard Problem

Status
Not open for further replies.
Level 10
Joined
Sep 25, 2013
Messages
521
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