• 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.
  • 💡 We're thrilled to announce that our upcoming texturing contest is in the works, and we're eager to hear your suggestions! Please take this opportunity to share your ideas in this theme discussion thread for the Texturing Contest #34!
  • 🏆 Hive's 7th HD Modeling Contest: Icecrown Creature is now open! The frozen wastes of Icecrown are home to some of Azeroth’s most terrifying and resilient creatures. For this contest, your challenge is to design and model a HD 3D monster that embodies the cold, undead, and sinister essence of Icecrown! 📅 Submissions close on April 13, 2025. Don't miss this opportunity to let your creativity shine! Enter now and show us your frozen masterpiece! 🔗 Click here to enter!

Multiboard race icons

Status
Not open for further replies.
Level 7
Joined
May 28, 2009
Messages
241
Im trying to figure out how to place the race icons in the right place. For the moment it only works if all the previous players are playing.

This is the trigger i got for giving players it's icon
Events
----Unit- A unit owned by Player 1 (red) Finishes construction
Conditions
----((Triggering unit) is a town-hall type unit) Equal to True
Actions
----If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-----If-Conditions
------(Unit-type of (Constructed structure)) Equal to ''Building''
-----Then-Actions
------Multiboard-Set the icon for (Last created multiboard) item in column 1.row(1+(Player number of(Owner of(Owner of(Constructed structure))))to ''icon''

sorry if im explaining poorly:cute:
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,275
Well you build a function which takes a player and returns which row its in. You then pass that function the player and then from the value returned you know which row to update.

The reason for a function is simply because it complements your multiboard creation engine better and should more efficently be able to get the values.
 
Level 4
Joined
Jun 12, 2009
Messages
57
Here let me try to help you clean it up a bit. I think this is what you want.
You need to put the following creation action into the trigger where you created your multiboard
  • Multiboard Creation
    • Events
      • Time - Elapsed game time is 5.00 seconds
    • Conditions
    • Actions
      • Multiboard - Set the display style for (Last created multiboard) item in column 1, row 0 to Hide text and Show icons

  • Multiboard Building Icon
    • Events
      • Unit - A unit Finishes construction
      • Conditions
        • (Unit-type of (Constructed structure)) Equal Building
      • Actions
        • Multiboard - Set the icon for (Last created multiboard) item in column 1, row ((Player number of (Owner of (Constructed structure))) + 1) to Put Your Icon Here.blp
 
Level 7
Joined
May 28, 2009
Messages
241
Kungfuman's way will only work if every (user) player has a spot in the multiboard.
If not, the value will be higher than the row of the icon i wish to change.
This is what it looks like..
attachment.php
 

Attachments

  • bild.jpg
    bild.jpg
    49.9 KB · Views: 308
Level 15
Joined
Aug 14, 2007
Messages
936
its pretty simple
first use an array of integer that records the row position of the players according
Player red will be array[1]
player blue will be array[2] and so on...
when u are done, use a nested double for loop, 1 using loop a and the other using B
E.G

For loop A 1 to 5
then
for loop B 1 to 5

now we have 5 rows and 5 collumns to go through
for the first collum
check for integer A to be 1
then check for integer B to not be the first row
then disable text and allow icon, then show the icon with a variable string that you will change when someone choose a race

After all these add a update board trigger using periodic timer that runs those for loops updating the icons with strings, hope that helped!
 
Status
Not open for further replies.
Top