• 🏆 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!

Can someone teach me how to use multiboards?

Status
Not open for further replies.
Level 3
Joined
Apr 19, 2011
Messages
32
That did not helped me at all.
And i still didnt founded a answer...

Edit: I need a multiboard that has a custom population limit.
I mean, that you start with 0/10 (10=food capacity from town hall) (0=number of units).
so if i train 1 man, it would be 1/10.
If i train 9, it would be 10/10.
if i train more than that, it wouldn't let me do anymore.
If i build a farm, it will be 10/16.
Also, if all farms and all town halls are destroyed, it would be 16/0, and in every 30 second, a unit owned by me dies.
Can anybody help me with this thing?
 
Last edited:
Level 9
Joined
Apr 23, 2011
Messages
460
What Pharaoh_ is saying is that. If you don't want to read the tutorial, and "learn by yourself" from it, then no one can help you, and your question is foolish. I read tutorials on multiboards and can now make any kind of multiboard I want to, and make it do what I want to. So if you won't help yourself, no one can help you.
 
Ok, let's see,
Let's say that your custom food cap is at column 2, row 2 on the multiboard.
  • Trigger
  • Events
    • Unit - A unit finishes construction
  • Conditions
  • Actions
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • (Unit-type of (Triggering unit)) Equal to Farm
      • Then - Actions
        • Set FoodCap[(Player number of (Triggering player))] = (FoodCap[(Player number of (Triggering player))] + 6)
      • Else - Actions
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • ((Triggering unit) is A town-hall-type unit) Equal to True
          • Then - Actions
            • Set FoodCap[(Player number of (Triggering player))] = (FoodCap[(Player number of (Triggering player))] + 10)
          • Else - Actions
    • Multiboard - Set the text for Multiboard item in column 2, row 2 to (((String(FoodUsed[(Player number of (Triggering player))])) + /) + (String(FoodCap[(Player number of (Triggering player))])))
  • Trigger
  • Events
    • Unit - A unit enters (Playable Map Area)
  • Conditions
    • ((Triggering unit) is in AlreadyCounted) Equal to False
    • ((Triggering unit) us a structure) Equal to False
  • Actions
    • Unit Group - Add (Triggering unit) to AlreadyCounted
    • Set FoodUsed[(Player number of (Triggering player))] = (FoodUsed[(Player number of (Triggering player))] + 1)
    • Multiboard - Set the text for Multiboard item in column 2, row 2 to (((String(FoodUsed[(Player number of (Triggering player))])) + /) + (String(FoodCap[(Player number of (Triggering player))])))
  • Tr
  • Events
    • Unit - A unit dies
  • Conditions
  • Actions
    • Set PlayerNumber = (Player number of (Triggering player))
    • If (All conditions are true) then do (Actions) else do (Actions)
      • If - Conditions
        • ((Triggering unit) is a structure) Equal to False
      • Then - Actions
        • Set FoodUsed[PlayerNumber] = (FoodUsed[PlayerNumber] - 1)
        • Multiboard - Set the text for Multiboard item in column 2, row 2 to (((String(FoodUsed[PlayerNumber])) + /) + (String(FoodCap[PlayerNumber])))
        • Unit Group - Remove (Triggering unit) from AlreadyCounted
      • Else - Actions
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • (Unit-type of (Triggering unit)) Equal to Farm
          • Then - Actions
            • Set FoodCap[PlayerNumber] = (FoodCap[PlayerNumber] - 6)
          • Else - Actions
            • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              • If - Conditions
                • ((Triggering unit) is A town-hall-type unit) Equal to True
              • Then - Actions
                • Set FoodCap[PlayerNumber] = (FoodCap[PlayerNumber] - 10)
              • Else - Actions
        • Multiboard - Set the text for Multiboard item in column 2, row 2 to (((String(FoodUsed[PlayerNumber])) + /) + (String(FoodCap[PlayerNumber])))
 
Level 3
Joined
Apr 19, 2011
Messages
32
Ok, let's see,
Let's say that your custom food cap is at column 2, row 2 on the multiboard.
  • Trigger
  • Events
    • Unit - A unit finishes construction
  • Conditions
  • Actions
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • (Unit-type of (Triggering unit)) Equal to Farm
      • Then - Actions
        • Set FoodCap[(Player number of (Triggering player))] = (FoodCap[(Player number of (Triggering player))] + 6)
      • Else - Actions
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • ((Triggering unit) is A town-hall-type unit) Equal to True
          • Then - Actions
            • Set FoodCap[(Player number of (Triggering player))] = (FoodCap[(Player number of (Triggering player))] + 10)
          • Else - Actions
    • Multiboard - Set the text for Multiboard item in column 2, row 2 to (((String(FoodUsed[(Player number of (Triggering player))])) + /) + (String(FoodCap[(Player number of (Triggering player))])))
  • Trigger
  • Events
    • Unit - A unit enters (Playable Map Area)
  • Conditions
    • ((Triggering unit) is in AlreadyCounted) Equal to False
    • ((Triggering unit) us a structure) Equal to False
  • Actions
    • Unit Group - Add (Triggering unit) to AlreadyCounted
    • Set FoodUsed[(Player number of (Triggering player))] = (FoodUsed[(Player number of (Triggering player))] + 1)
    • Multiboard - Set the text for Multiboard item in column 2, row 2 to (((String(FoodUsed[(Player number of (Triggering player))])) + /) + (String(FoodCap[(Player number of (Triggering player))])))
  • Tr
  • Events
    • Unit - A unit dies
  • Conditions
  • Actions
    • Set PlayerNumber = (Player number of (Triggering player))
    • If (All conditions are true) then do (Actions) else do (Actions)
      • If - Conditions
        • ((Triggering unit) is a structure) Equal to False
      • Then - Actions
        • Set FoodUsed[PlayerNumber] = (FoodUsed[PlayerNumber] - 1)
        • Multiboard - Set the text for Multiboard item in column 2, row 2 to (((String(FoodUsed[PlayerNumber])) + /) + (String(FoodCap[PlayerNumber])))
        • Unit Group - Remove (Triggering unit) from AlreadyCounted
      • Else - Actions
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • (Unit-type of (Triggering unit)) Equal to Farm
          • Then - Actions
            • Set FoodCap[PlayerNumber] = (FoodCap[PlayerNumber] - 6)
          • Else - Actions
            • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              • If - Conditions
                • ((Triggering unit) is A town-hall-type unit) Equal to True
              • Then - Actions
                • Set FoodCap[PlayerNumber] = (FoodCap[PlayerNumber] - 10)
              • Else - Actions
        • Multiboard - Set the text for Multiboard item in column 2, row 2 to (((String(FoodUsed[PlayerNumber])) + /) + (String(FoodCap[PlayerNumber])))
Nice triggers you got there, shame you couldn't have show me the variables or test map......sssSSSss....
Sorry if this is like a BUMP-like post, but couldnt get the variables......
 
Level 3
Joined
Apr 19, 2011
Messages
32
When you said Let's say that your custom food cap is at column 2, row 2 on the multiboard.;
You refer to the multiboard from the tutorial?
If yes, from what part?
 

Dr Super Good

Spell Reviewer
Level 63
Joined
Jan 18, 2005
Messages
27,180
The food limit is there for a reason.
If you have 300 units at once, your map is probably going to be unplayable as WC3 is not designed to support that many per player (especially if moving).

Do be aware that multiboard GUI actions take a lot of opperations due to unefficient underlying mechanics so avoid setting too many elements at once. The reason for this is because each multiboard manipulation involves itterating through all elements and then generating a pointer to that specific element, modifying it and then releasing it.
 
Level 3
Joined
Apr 19, 2011
Messages
32
Sorry for being necro, but just to tell.
@Dr Super Good
I know, but well, I wanna use units with more than 8 food.
That's the reason.

About the topic...
A, test map, please?
I'm planning something pretty "scripted".
 
Last edited:
Status
Not open for further replies.
Top