• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Multiboard text overlapping?

Status
Not open for further replies.
Level 13
Joined
Oct 16, 2010
Messages
731
I am trying to create unique multiboards for each player of my map that will show how many of each faction or trait type they have, I am trying to make it so rather than it show every single type of faction/trait it will only show what the player actually has. So to do this I have made it so that the rows increase/decrease accordingly - however it has led to some weird text overlaps? I have tried adding to the update trigger to clear and remake the relevant multiboard but that just kept making the game crash instead...

Any idea why this is happening or how to fix it?


20211223_115007.jpg
20211223_115017.jpg


  • Update Faction Multiboard
    • Events
    • Conditions
    • Actions
      • Set VariableSet TempCount = 0
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Number of units in FactionGroup_Ancient[TempInt]) Greater than 0
        • Then - Actions
          • Set VariableSet TempCount = (TempCount + 1)
          • Multiboard - Change the number of rows for MultiboardFactions[TempInt] to TempCount
          • Multiboard - Set the text for MultiboardFactions[TempInt] item in column 1, row TempCount to Ancient
          • Multiboard - Set the text for MultiboardFactions[TempInt] item in column 2, row TempCount to (String((Number of units in FactionGroup_Ancient[TempInt])))
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Number of units in FactionGroup_Bandit[TempInt]) Greater than 0
        • Then - Actions
          • Set VariableSet TempCount = (TempCount + 1)
          • Multiboard - Change the number of rows for MultiboardFactions[TempInt] to TempCount
          • Multiboard - Set the text for MultiboardFactions[TempInt] item in column 1, row TempCount to Bandit
          • Multiboard - Set the text for MultiboardFactions[TempInt] item in column 2, row TempCount to (String((Number of units in FactionGroup_Bandit[TempInt])))
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Number of units in FactionGroup_Beast[TempInt]) Greater than 0
        • Then - Actions
          • Set VariableSet TempCount = (TempCount + 1)
          • Multiboard - Change the number of rows for MultiboardFactions[TempInt] to TempCount
          • Multiboard - Set the text for MultiboardFactions[TempInt] item in column 1, row TempCount to Beast
          • Multiboard - Set the text for MultiboardFactions[TempInt] item in column 2, row TempCount to (String((Number of units in FactionGroup_Beast[TempInt])))
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Number of units in FactionGroup_Demon[TempInt]) Greater than 0
        • Then - Actions
          • Set VariableSet TempCount = (TempCount + 1)
          • Multiboard - Change the number of rows for MultiboardFactions[TempInt] to TempCount
          • Multiboard - Set the text for MultiboardFactions[TempInt] item in column 1, row TempCount to Demon
          • Multiboard - Set the text for MultiboardFactions[TempInt] item in column 2, row TempCount to (String((Number of units in FactionGroup_Demon[TempInt])))
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Number of units in FactionGroup_Dwarf[TempInt]) Greater than 0
        • Then - Actions
          • Set VariableSet TempCount = (TempCount + 1)
          • Multiboard - Change the number of rows for MultiboardFactions[TempInt] to TempCount
          • Multiboard - Set the text for MultiboardFactions[TempInt] item in column 1, row TempCount to Dwarf
          • Multiboard - Set the text for MultiboardFactions[TempInt] item in column 2, row TempCount to (String((Number of units in FactionGroup_Dwarf[TempInt])))
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Number of units in FactionGroup_Human[TempInt]) Greater than 0
        • Then - Actions
          • Set VariableSet TempCount = (TempCount + 1)
          • Multiboard - Change the number of rows for MultiboardFactions[TempInt] to TempCount
          • Multiboard - Set the text for MultiboardFactions[TempInt] item in column 1, row TempCount to Human
          • Multiboard - Set the text for MultiboardFactions[TempInt] item in column 2, row TempCount to (String((Number of units in FactionGroup_Human[TempInt])))
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Number of units in FactionGroup_Naga[TempInt]) Greater than 0
        • Then - Actions
          • Set VariableSet TempCount = (TempCount + 1)
          • Multiboard - Change the number of rows for MultiboardFactions[TempInt] to TempCount
          • Multiboard - Set the text for MultiboardFactions[TempInt] item in column 1, row TempCount to Naga
          • Multiboard - Set the text for MultiboardFactions[TempInt] item in column 2, row TempCount to (String((Number of units in FactionGroup_Naga[TempInt])))
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Number of units in FactionGroup_NightElf[TempInt]) Greater than 0
        • Then - Actions
          • Set VariableSet TempCount = (TempCount + 1)
          • Multiboard - Change the number of rows for MultiboardFactions[TempInt] to TempCount
          • Multiboard - Set the text for MultiboardFactions[TempInt] item in column 1, row TempCount to Night Elf
          • Multiboard - Set the text for MultiboardFactions[TempInt] item in column 2, row TempCount to (String((Number of units in FactionGroup_NightElf[TempInt])))
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Number of units in FactionGroup_Orc[TempInt]) Greater than 0
        • Then - Actions
          • Set VariableSet TempCount = (TempCount + 1)
          • Multiboard - Change the number of rows for MultiboardFactions[TempInt] to TempCount
          • Multiboard - Set the text for MultiboardFactions[TempInt] item in column 1, row TempCount to Orc
          • Multiboard - Set the text for MultiboardFactions[TempInt] item in column 2, row TempCount to (String((Number of units in FactionGroup_Orc[TempInt])))
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Number of units in FactionGroup_Spectre[TempInt]) Greater than 0
        • Then - Actions
          • Set VariableSet TempCount = (TempCount + 1)
          • Multiboard - Change the number of rows for MultiboardFactions[TempInt] to TempCount
          • Multiboard - Set the text for MultiboardFactions[TempInt] item in column 1, row TempCount to Spectre
          • Multiboard - Set the text for MultiboardFactions[TempInt] item in column 2, row TempCount to (String((Number of units in FactionGroup_Spectre[TempInt])))
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Number of units in FactionGroup_Undead[TempInt]) Greater than 0
        • Then - Actions
          • Set VariableSet TempCount = (TempCount + 1)
          • Multiboard - Change the number of rows for MultiboardFactions[TempInt] to TempCount
          • Multiboard - Set the text for MultiboardFactions[TempInt] item in column 1, row TempCount to Undead
          • Multiboard - Set the text for MultiboardFactions[TempInt] item in column 2, row TempCount to (String((Number of units in FactionGroup_Undead[TempInt])))
        • Else - Actions
      • Multiboard - Set the display style for MultiboardFactions[TempInt] item in column 0, row 0 to Show text and Hide icons
      • Multiboard - Set the width for MultiboardFactions[TempInt] item in column 1, row 0 to 6.00% of the total screen width
      • Multiboard - Set the width for MultiboardFactions[TempInt] item in column 2, row 0 to 4.00% of the total screen width
  • Update Trait Multiboard
    • Events
    • Conditions
    • Actions
      • Set VariableSet TempCount = 0
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Number of units in TraitGroup_Assassin[TempInt]) Greater than 0
        • Then - Actions
          • Set VariableSet TempCount = (TempCount + 1)
          • Multiboard - Change the number of rows for MultiboardTraits[TempInt] to TempCount
          • Multiboard - Set the text for MultiboardTraits[TempInt] item in column 1, row TempCount to Assassin
          • Multiboard - Set the text for MultiboardTraits[TempInt] item in column 2, row TempCount to (String((Number of units in TraitGroup_Assassin[TempInt])))
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Number of units in TraitGroup_Beastmaster[TempInt]) Greater than 0
        • Then - Actions
          • Set VariableSet TempCount = (TempCount + 1)
          • Multiboard - Change the number of rows for MultiboardTraits[TempInt] to TempCount
          • Multiboard - Set the text for MultiboardTraits[TempInt] item in column 1, row TempCount to Beastmaster
          • Multiboard - Set the text for MultiboardTraits[TempInt] item in column 2, row TempCount to (String((Number of units in TraitGroup_Beastmaster[TempInt])))
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Number of units in TraitGroup_Brawler[TempInt]) Greater than 0
        • Then - Actions
          • Set VariableSet TempCount = (TempCount + 1)
          • Multiboard - Change the number of rows for MultiboardTraits[TempInt] to TempCount
          • Multiboard - Set the text for MultiboardTraits[TempInt] item in column 1, row TempCount to Brawler
          • Multiboard - Set the text for MultiboardTraits[TempInt] item in column 2, row TempCount to (String((Number of units in TraitGroup_Brawler[TempInt])))
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Number of units in TraitGroup_Fighter[TempInt]) Greater than 0
        • Then - Actions
          • Set VariableSet TempCount = (TempCount + 1)
          • Multiboard - Change the number of rows for MultiboardTraits[TempInt] to TempCount
          • Multiboard - Set the text for MultiboardTraits[TempInt] item in column 1, row TempCount to Fighter
          • Multiboard - Set the text for MultiboardTraits[TempInt] item in column 2, row TempCount to (String((Number of units in TraitGroup_Fighter[TempInt])))
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Number of units in TraitGroup_Machine[TempInt]) Greater than 0
        • Then - Actions
          • Set VariableSet TempCount = (TempCount + 1)
          • Multiboard - Change the number of rows for MultiboardTraits[TempInt] to TempCount
          • Multiboard - Set the text for MultiboardTraits[TempInt] item in column 1, row TempCount to Machine
          • Multiboard - Set the text for MultiboardTraits[TempInt] item in column 2, row TempCount to (String((Number of units in TraitGroup_Machine[TempInt])))
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Number of units in TraitGroup_Mage[TempInt]) Greater than 0
        • Then - Actions
          • Set VariableSet TempCount = (TempCount + 1)
          • Multiboard - Change the number of rows for MultiboardTraits[TempInt] to TempCount
          • Multiboard - Set the text for MultiboardTraits[TempInt] item in column 1, row TempCount to Mage
          • Multiboard - Set the text for MultiboardTraits[TempInt] item in column 2, row TempCount to (String((Number of units in TraitGroup_Mage[TempInt])))
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Number of units in TraitGroup_Mauler[TempInt]) Greater than 0
        • Then - Actions
          • Set VariableSet TempCount = (TempCount + 1)
          • Multiboard - Change the number of rows for MultiboardTraits[TempInt] to TempCount
          • Multiboard - Set the text for MultiboardTraits[TempInt] item in column 1, row TempCount to Mauler
          • Multiboard - Set the text for MultiboardTraits[TempInt] item in column 2, row TempCount to (String((Number of units in TraitGroup_Mauler[TempInt])))
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Number of units in TraitGroup_Protector[TempInt]) Greater than 0
        • Then - Actions
          • Set VariableSet TempCount = (TempCount + 1)
          • Multiboard - Change the number of rows for MultiboardTraits[TempInt] to TempCount
          • Multiboard - Set the text for MultiboardTraits[TempInt] item in column 1, row TempCount to Protector
          • Multiboard - Set the text for MultiboardTraits[TempInt] item in column 2, row TempCount to (String((Number of units in TraitGroup_Protector[TempInt])))
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Number of units in TraitGroup_Ranger[TempInt]) Greater than 0
        • Then - Actions
          • Set VariableSet TempCount = (TempCount + 1)
          • Multiboard - Change the number of rows for MultiboardTraits[TempInt] to TempCount
          • Multiboard - Set the text for MultiboardTraits[TempInt] item in column 1, row TempCount to Ranger
          • Multiboard - Set the text for MultiboardTraits[TempInt] item in column 2, row TempCount to (String((Number of units in TraitGroup_Ranger[TempInt])))
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Number of units in TraitGroup_Spellcaster[TempInt]) Greater than 0
        • Then - Actions
          • Set VariableSet TempCount = (TempCount + 1)
          • Multiboard - Change the number of rows for MultiboardTraits[TempInt] to TempCount
          • Multiboard - Set the text for MultiboardTraits[TempInt] item in column 1, row TempCount to Spellcaster
          • Multiboard - Set the text for MultiboardTraits[TempInt] item in column 2, row TempCount to (String((Number of units in TraitGroup_Spellcaster[TempInt])))
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Number of units in TraitGroup_Summoner[TempInt]) Greater than 0
        • Then - Actions
          • Set VariableSet TempCount = (TempCount + 1)
          • Multiboard - Change the number of rows for MultiboardTraits[TempInt] to TempCount
          • Multiboard - Set the text for MultiboardTraits[TempInt] item in column 1, row TempCount to Summoner
          • Multiboard - Set the text for MultiboardTraits[TempInt] item in column 2, row TempCount to (String((Number of units in TraitGroup_Summoner[TempInt])))
        • Else - Actions
      • Multiboard - Set the display style for MultiboardTraits[TempInt] item in column 0, row 0 to Show text and Hide icons
      • Multiboard - Set the width for MultiboardTraits[TempInt] item in column 1, row 0 to 6.00% of the total screen width
      • Multiboard - Set the width for MultiboardTraits[TempInt] item in column 2, row 0 to 4.00% of the total screen width
 
Level 13
Joined
Oct 16, 2010
Messages
731
Unfortunately the data I want on the multiboard would give your opponents an idea of what units you are buying...

On Legion TD the multiboard is half hidden when playing on mastermind (?) - half map hidden. So all the stats for the enemy team are hidden but you can see all of your teams stats, not sure how they did that but that would work fine if I knew how to do it
 
Level 12
Joined
Mar 13, 2020
Messages
421
I think they have 2 multiboards for both teams

And in the First one they show stats set it to and then they null them when hiding that means you think it’s one multiboard for both but it’s not it’s two showing they Same things only mirrord

Example 2 multiboards one for player 1 and one for player 2

Both have:

Player1 name / icon / gold
Player2 name / icon / gold

Now you show both values for both players...

Multiboard player1
Player1 name / icon / 300 gold
Player2 name / icon / 250 gold

Multiboard player2
Player1 name / icon / 300 gold
Player2 name / icon / 250 gold

Now you hide the value of them

Multiboard player1
Player1 name / icon / 300 gold
Player2 name / icon / - gold

Multiboard player2
Player1 name / icon / - gold
Player2 name / icon / 250 gold

You just need two multiboards created for each team
And the variables holding the data for each team

That means:

GoldMultiboard1[1] = 300
GoldMultiboard1[2] = 250

GoldMultiboard2[1] = 300
GoldMultiboard2[2] = 250

And when you hide them:

GoldMultiboard1[1] = 300
GoldMultiboard1[2] = -

GoldMultiboard2[1] = -
GoldMultiboard2[2] = 250

Ps. Correct me if I’m wrong....
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,202
Just to clarify, you have given each player their own unique multiboard which is shown just to them using GetLocalPlayer? I would avoid locally editing the same multiboard for individual players.

If using custom script, I recall multiboard sizes being measured in fraction of the screen. This might cause issues with some resolutions depending how it handles scaling.

It is possible this is caused by some Reforged bug. I have noticed multiboards in some older custom maps having overlap issues which likely did not have them before widescreen support was added.

It is possible this is caused by a scripting logic bug. Without knowing your triggers it is difficult to diagnose.
 
Level 13
Joined
Oct 16, 2010
Messages
731
I hadn't got as far as showing them locally per player as I was just testing it as it is, so in its current state everyone would be shown the multiboard when it has been updated (or rebuilt in my case)

The triggers are in my original post
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,202
I recall something similar to this problem long ago. I forget the exact details though.

Try hiding the multiboard before editing it, especially when changing properties like row/column count or column width. After all edits are done, show it again to the player. If that does not work try enabling it again with a delay, such as 0.01 seconds.
 
Level 13
Joined
Oct 16, 2010
Messages
731
I've attached the map below - I've made a folder with all the triggers that affect the multiboards in any way so you should be able to find them easily

The easiest way to see the problem ingame is to pick the "Rations" modifier as it gives increased food so you can get more factions/traits easier

(or just add whatever you need!)

Thanks for this, my previous method for showing this was just a game message but the list gets too long and gets cut off, so I thought a multiboard would be better and would probably be easier to view anyway!
 

Attachments

  • TFT Type Thing.w3m
    263 KB · Views: 9

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,202
The problem seems related to resizing (actions changing row or column count) a multiboard multiple times instantaneously (same frame/internal update). There seems to be some unsafe behaviour when this happens resulting in elements of the multiboard that should have been removed being left attached to the multiboard in a way they can no longer be manipulated. This sort of dangling reference bug likely explains the crashes when you try to destroy the multiboard.

I think a sensible solution would be to first determine the total number of rows needed, set the number rows to the number needed in a single action and then fill in all the rows with information. This way the multiboard will only be resized once, as opposed to currently where it is resized for each row.
 
Level 13
Joined
Oct 16, 2010
Messages
731
Your method works! Had some overlapping issues still but that seems to have been fixed by adding a condition to only update each multiboard while it is showing

Just need to make them show to the relevant player

On a different note, is it possible to have multiple multiboards showing at a time? I tried and it doesn't seem to be the case?
 
Level 13
Joined
Oct 16, 2010
Messages
731
No worries that's fine was just an idea but it's fine as it is. Thanks again :)


EDIT: I'm almost there but having trouble setting up the local player stuff (not done it before). I've checked other threads and think I have got it right but am getting an error message when I try to save?

  • Cast Multiboard
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Swap Multiboards
    • Actions
      • Set VariableSet TempInt = (Player number of (Owner of (Triggering unit)))
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Level of Swap Multiboards for (Triggering unit)) Equal to 1
        • Then - Actions
          • -------- Score to Factions --------
          • Unit - Set level of Swap Multiboards for (Triggering unit) to 2
          • Set VariableSet localplayer = (Owner of (Triggering unit))
          • Custom script: udg_localplayer == GetLocalPlayer() then
          • Custom script: call MultiboardDisplayBJ( false, udg_MultiboardScore )
          • Custom script: call MultiboardDisplayBJ( true, udg_MultiboardFactions[udg_TempInt] )
          • Custom script: endif
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Level of Swap Multiboards for (Triggering unit)) Equal to 2
            • Then - Actions
              • -------- Factions to Traits --------
              • Unit - Set level of Swap Multiboards for (Triggering unit) to 3
              • Set VariableSet localplayer = (Owner of (Triggering unit))
              • Custom script: udg_localplayer == GetLocalPlayer() then
              • Custom script: call MultiboardDisplayBJ( false, udg_MultiboardFactions[udg_TempInt] )
              • Custom script: call MultiboardDisplayBJ( true, udg_MultiboardTraits[udg_TempInt] )
              • Custom script: endif
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Level of Swap Multiboards for (Triggering unit)) Equal to 3
                • Then - Actions
                  • -------- Traits to Score --------
                  • Unit - Set level of Swap Multiboards for (Triggering unit) to 1
                  • Set VariableSet localplayer = (Owner of (Triggering unit))
                  • Custom script: udg_localplayer == GetLocalPlayer() then
                  • Custom script: call MultiboardDisplayBJ( false, udg_MultiboardTraits[udg_TempInt] )
                  • Custom script: call MultiboardDisplayBJ( true, udg_MultiboardScore )
                  • Custom script: endif
                • Else - Actions
      • Trigger - Run Update Faction Multiboard <gen> (checking conditions)
      • Trigger - Run Update Trait Multiboard <gen> (checking conditions)

1641506161640.png
 
Last edited:

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,202
You are opening a flow control if statement. The block of code that is run when that is true is then specified. You then closing that flow control statement using an endif. Then you are trying to have else actions should the condition not be true, which makes no sense as there is no flow control statement open for the else statement to be associated with.

What you are currently doing...
Code:
if blah then
// ...
endif
else // SYNTAX ERROR: There is no open if statement for this!

What you might be wanting...
Code:
if blah then
// ...
else // When the above condition fails, the below block will run!
// ...
endif
 
Level 13
Joined
Oct 16, 2010
Messages
731
Sorry I've not really done much with custom scripts and coding. So it is an issue to do with the GUI if/then/else condition? Or is it caused by the custom scripts?

I only have the extra "endif" as I thought it was required to be able to show a multiboard to a particular player?
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,202
So it is an issue to do with the GUI if/then/else condition? Or is it caused by the custom scripts?
You have only showed the resulting script. You will need to show the GUI trigger for me to be able to locate and explain the exact cause. In any case it seems like you are terminating the conditional flow control sequence at an inappropriate time.
I only have the extra "endif" as I thought it was required to be able to show a multiboard to a particular player?
It closes a conditional flow control sequence. Specifically it ends an if/elseif/else sequence. This is part of telling the computer what code you want run under specific conditions rather than just executed sequentially like a computer will do otherwise.
 
Level 13
Joined
Oct 16, 2010
Messages
731
This is the full trigger

  • Cast Multiboard
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Swap Multiboards
    • Actions
      • Set VariableSet TempInt = (Player number of (Owner of (Triggering unit)))
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Level of Swap Multiboards for (Triggering unit)) Equal to 1
        • Then - Actions
          • -------- Score to Factions --------
          • Unit - Set level of Swap Multiboards for (Triggering unit) to 2
          • Set VariableSet localplayer = (Owner of (Triggering unit))
          • Custom script: udg_localplayer == GetLocalPlayer() then
          • Custom script: call MultiboardDisplayBJ( false, udg_MultiboardScore )
          • Custom script: call MultiboardDisplayBJ( true, udg_MultiboardFactions[udg_TempInt] )
          • Custom script: endif
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Level of Swap Multiboards for (Triggering unit)) Equal to 2
            • Then - Actions
              • -------- Factions to Traits --------
              • Unit - Set level of Swap Multiboards for (Triggering unit) to 3
              • Set VariableSet localplayer = (Owner of (Triggering unit))
              • Custom script: udg_localplayer == GetLocalPlayer() then
              • Custom script: call MultiboardDisplayBJ( false, udg_MultiboardFactions[udg_TempInt] )
              • Custom script: call MultiboardDisplayBJ( true, udg_MultiboardTraits[udg_TempInt] )
              • Custom script: endif
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Level of Swap Multiboards for (Triggering unit)) Equal to 3
                • Then - Actions
                  • -------- Traits to Score --------
                  • Unit - Set level of Swap Multiboards for (Triggering unit) to 1
                  • Set VariableSet localplayer = (Owner of (Triggering unit))
                  • Custom script: udg_localplayer == GetLocalPlayer() then
                  • Custom script: call MultiboardDisplayBJ( false, udg_MultiboardTraits[udg_TempInt] )
                  • Custom script: call MultiboardDisplayBJ( true, udg_MultiboardScore )
                  • Custom script: endif
                • Else - Actions
      • Trigger - Run Update Faction Multiboard <gen> (checking conditions)
      • Trigger - Run Update Trait Multiboard <gen> (checking conditions)
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,202
Custom script: udg_localplayer == GetLocalPlayer() then
This line is corrupt/incomplete. I am guessing it is meant to be...
Custom script: if udg_localplayer == GetLocalPlayer() then
In which case you need to return the endif statements since you are then opening your own conditional flow control block. The missing if threw me off earlier.
 
Level 13
Joined
Oct 16, 2010
Messages
731
Oh yeah sorry I must have copied it incorrectly from the other thread. I've made that change and it doesn't come up with any errors anymore!

However when I pressed the ability to change the multiboard the game crashed... so something still isn't quite right!
 
Status
Not open for further replies.
Top