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

Status
Not open for further replies.
Level 7
Joined
Aug 19, 2009
Messages
278
Need help making multibord mui

Hey guys I had made a multiboard so that life bar and mana bar of a unit that is selected and your hero is updated in multiboard. I need help making this MUI(MPI to be exact).

Variables

unit udg_TargetingHero[0] = the hero owned my the player(As this will work as a rpg so only 1 hero for player this won't change)
[0] = player one, [1] = player two etc

unit udg_TargetedUnit[0] = unit selected by the player 1. This will change in game
[1] = unit selected by player 2 and so on

real udg_Unitselected[0] If a unit is selected by the player on now. If player 1 has a unit selected then udg_Unitselected[0] = 1 or else 0
If the selected unit dies or goes out of range then it becomes 0 until another unit is selected

special effect udg_se[0] is the array which stores the special effect of the targetedunit for each player. Its a selection ciricle which spawns on the origin of the targetedunit when it is selected by a player.

As the multiboard triggers are huge, I have attached the map. I have removed the systems that were not necessary but there variables are still present.

-----

Edit - I posted it in the wrong section. Can a mod please move it to World Editor Help Zone.
 

Attachments

  • Multiboard mui.w3x
    66.2 KB · Views: 60
Level 7
Joined
Aug 19, 2009
Messages
278
Hey guys I had made a multiboard so that life bar and mana bar of a unit that is selected and your hero is updated in multiboard. I need help making this MUI(MPI to be exact).

Variables

unit udg_TargetingHero[0] = the hero owned my the player(As this will work as a rpg so only 1 hero for player this won't change)
[0] = player one, [1] = player two etc

unit udg_TargetedUnit[0] = unit selected by the player 1. This will change in game
[1] = unit selected by player 2 and so on

real udg_Unitselected[0] If a unit is selected by the player on now. If player 1 has a unit selected then udg_Unitselected[0] = 1 or else 0
If the selected unit dies or goes out of range then it becomes 0 until another unit is selected

special effect udg_se[0] is the array which stores the special effect of the targetedunit for each player. Its a selection ciricle which spawns on the origin of the targetedunit when it is selected by a player.

As the multiboard triggers are huge, I have attached the map. I have removed the systems that were not necessary but there variables are still present.
 

Attachments

  • Multiboard mui.w3x
    66.1 KB · Views: 57
Level 11
Joined
Feb 23, 2009
Messages
577
  • Set Player_A = Player 1 (Red)
  • Custom script: if GetLocalPlayer()==Player(udg_Player_A) then
  • Multiboard - Show Board[1]
  • Custom script: endif
You have to make sure you do not set any variables that may affect other players as it will crash the game.

You basically make 12 multiboards, then show the right one to the right player.


PS: Also I would not mix custom text and GUI triggers as it makes it very annoying to help you lol...
 
Level 7
Joined
Aug 19, 2009
Messages
278
Ok then it needs to be MUI. I thought its multiboards so only player instance are needed.


Multiboard creation (Not really needed to see. Also GUI)

ROW 1
  • Row 1
    • Events
      • Time - Elapsed game time is 0.13 seconds
    • Conditions
    • Actions
      • Multiboard - Set the width for multiboard item in column 1, row 1 to 1.00% of the total screen width
      • Multiboard - Set the width for multiboard item in column 2, row 1 to 10.00% of the total screen width
      • Multiboard - Set the width for multiboard item in column 3, row 1 to 4.30% of the total screen width
      • Multiboard - Set the width for multiboard item in column 4, row 1 to 1.00% of the total screen width
      • Multiboard - Set the width for multiboard item in column 5, row 1 to 10.00% of the total screen width
      • Multiboard - Set the width for multiboard item in column 6, row 1 to 0.00% of the total screen width
      • Multiboard - Set the width for multiboard item in column 7, row 1 to 0.00% of the total screen width
      • Multiboard - Set the width for multiboard item in column 8, row 1 to 0.00% of the total screen width
      • Multiboard - Set the width for multiboard item in column 9, row 1 to 0.00% of the total screen width
      • Multiboard - Set the width for multiboard item in column 10, row 1 to 0.00% of the total screen width
      • Multiboard - Set the width for multiboard item in column 11, row 1 to 0.00% of the total screen width
      • Multiboard - Set the width for multiboard item in column 12, row 1 to 0.00% of the total screen width
      • Multiboard - Set the width for multiboard item in column 13, row 1 to 0.00% of the total screen width
      • Multiboard - Set the width for multiboard item in column 14, row 1 to 0.00% of the total screen width
      • Multiboard - Set the width for multiboard item in column 15, row 1 to 0.00% of the total screen width
      • Multiboard - Set the width for multiboard item in column 16, row 1 to 5.00% of the total screen width
      • Multiboard - Set the width for multiboard item in column 17, row 1 to 0.00% of the total screen width
      • Multiboard - Set the width for multiboard item in column 18, row 1 to 0.00% of the total screen width
      • Multiboard - Set the width for multiboard item in column 19, row 1 to 0.00% of the total screen width
      • Multiboard - Set the width for multiboard item in column 20, row 1 to 0.00% of the total screen width
      • Multiboard - Set the width for multiboard item in column 21, row 1 to 0.00% of the total screen width
      • Multiboard - Set the display style for multiboard item in column 1, row 1 to Hide text and Hide icons
      • Multiboard - Set the display style for multiboard item in column 3, row 1 to Hide text and Hide icons
      • Multiboard - Set the display style for multiboard item in column 4, row 1 to Hide text and Hide icons
      • Multiboard - Set the display style for multiboard item in column 6, row 1 to Hide text and Hide icons
      • Multiboard - Set the display style for multiboard item in column 7, row 1 to Hide text and Hide icons
      • Multiboard - Set the display style for multiboard item in column 8, row 1 to Hide text and Hide icons
      • Multiboard - Set the display style for multiboard item in column 9, row 1 to Hide text and Hide icons
      • Multiboard - Set the display style for multiboard item in column 10, row 1 to Hide text and Hide icons
      • Multiboard - Set the display style for multiboard item in column 11, row 1 to Hide text and Hide icons
      • Multiboard - Set the display style for multiboard item in column 12, row 1 to Hide text and Hide icons
      • Multiboard - Set the display style for multiboard item in column 13, row 1 to Hide text and Hide icons
      • Multiboard - Set the display style for multiboard item in column 14, row 1 to Hide text and Hide icons
      • Multiboard - Set the display style for multiboard item in column 15, row 1 to Hide text and Hide icons
      • Multiboard - Set the display style for multiboard item in column 16, row 1 to Hide text and Hide icons
      • Multiboard - Set the display style for multiboard item in column 17, row 1 to Hide text and Hide icons
      • Multiboard - Set the display style for multiboard item in column 18, row 1 to Hide text and Hide icons
      • Multiboard - Set the display style for multiboard item in column 19, row 1 to Hide text and Hide icons
      • Multiboard - Set the display style for multiboard item in column 20, row 1 to Hide text and Hide icons
      • Multiboard - Set the display style for multiboard item in column 21, row 1 to Hide text and Hide icons
ROW 2
  • Row 2
    • Events
      • Time - Elapsed game time is 0.10 seconds
    • Conditions
    • Actions
      • Multiboard - Set the width for multiboard item in column 1, row 2 to 1.00% of the total screen width
      • Multiboard - Set the width for multiboard item in column 2, row 2 to 4.50% of the total screen width
      • Multiboard - Set the width for multiboard item in column 3, row 2 to 1.00% of the total screen width
      • Multiboard - Set the width for multiboard item in column 4, row 2 to 1.00% of the total screen width
      • Multiboard - Set the width for multiboard item in column 5, row 2 to 1.00% of the total screen width
      • Multiboard - Set the width for multiboard item in column 6, row 2 to 1.00% of the total screen width
      • Multiboard - Set the width for multiboard item in column 7, row 2 to 1.00% of the total screen width
      • Multiboard - Set the width for multiboard item in column 8, row 2 to 5.50% of the total screen width
      • Multiboard - Set the width for multiboard item in column 9, row 2 to 4.50% of the total screen width
      • Multiboard - Set the width for multiboard item in column 10, row 2 to 1.00% of the total screen width
      • Multiboard - Set the width for multiboard item in column 11, row 2 to 1.00% of the total screen width
      • Multiboard - Set the width for multiboard item in column 12, row 2 to 1.00% of the total screen width
      • Multiboard - Set the width for multiboard item in column 13, row 2 to 1.00% of the total screen width
      • Multiboard - Set the width for multiboard item in column 14, row 2 to 1.00% of the total screen width
      • Multiboard - Set the width for multiboard item in column 15, row 2 to 2.00% of the total screen width
      • Multiboard - Set the width for multiboard item in column 16, row 2 to 2.00% of the total screen width
      • Multiboard - Set the width for multiboard item in column 17, row 2 to 0.00% of the total screen width
      • Multiboard - Set the width for multiboard item in column 18, row 2 to 0.00% of the total screen width
      • Multiboard - Set the width for multiboard item in column 19, row 2 to 0.00% of the total screen width
      • Multiboard - Set the width for multiboard item in column 20, row 2 to 0.00% of the total screen width
      • Multiboard - Set the width for multiboard item in column 21, row 2 to 0.00% of the total screen width
      • Multiboard - Set the icon for multiboard item in column 10, row 2 to war3mapImported\Green-0-4.blp
      • Multiboard - Set the icon for multiboard item in column 11, row 2 to war3mapImported\Green-0-4.blp
      • Multiboard - Set the icon for multiboard item in column 12, row 2 to war3mapImported\Green-0-4.blp
      • Multiboard - Set the icon for multiboard item in column 13, row 2 to war3mapImported\Green-0-4.blp
      • Multiboard - Set the icon for multiboard item in column 14, row 2 to war3mapImported\Green-0-4.blp
      • Multiboard - Set the display style for multiboard item in column 15, row 2 to Hide text and Hide icons
      • Multiboard - Set the display style for multiboard item in column 1, row 2 to Show text and Hide icons
      • Multiboard - Set the display style for multiboard item in column 2, row 2 to Show text and Hide icons
      • Multiboard - Set the display style for multiboard item in column 8, row 2 to Show text and Hide icons
      • Multiboard - Set the display style for multiboard item in column 9, row 2 to Show text and Hide icons
      • Multiboard - Set the display style for multiboard item in column 16, row 2 to Hide text and Hide icons
      • Multiboard - Set the display style for multiboard item in column 17, row 2 to Hide text and Hide icons
      • Multiboard - Set the display style for multiboard item in column 18, row 2 to Hide text and Hide icons
      • Multiboard - Set the display style for multiboard item in column 19, row 2 to Hide text and Hide icons
      • Multiboard - Set the display style for multiboard item in column 20, row 2 to Hide text and Hide icons
      • Multiboard - Set the display style for multiboard item in column 21, row 2 to Hide text and Hide icons
      • Multiboard - Set the icon for multiboard item in column 3, row 2 to war3mapImported\Green-0-4.blp
      • Multiboard - Set the icon for multiboard item in column 4, row 2 to war3mapImported\Green-0-4.blp
      • Multiboard - Set the icon for multiboard item in column 5, row 2 to war3mapImported\Green-0-4.blp
      • Multiboard - Set the icon for multiboard item in column 6, row 2 to war3mapImported\Green-0-4.blp
      • Multiboard - Set the icon for multiboard item in column 7, row 2 to war3mapImported\Green-0-4.blp
ROW 3
  • Row 3
    • Events
      • Time - Elapsed game time is 0.11 seconds
    • Conditions
    • Actions
      • Multiboard - Set the width for multiboard item in column 1, row 3 to 1.00% of the total screen width
      • Multiboard - Set the width for multiboard item in column 2, row 3 to 4.50% of the total screen width
      • Multiboard - Set the width for multiboard item in column 3, row 3 to 1.00% of the total screen width
      • Multiboard - Set the width for multiboard item in column 4, row 3 to 1.00% of the total screen width
      • Multiboard - Set the width for multiboard item in column 5, row 3 to 1.00% of the total screen width
      • Multiboard - Set the width for multiboard item in column 6, row 3 to 1.00% of the total screen width
      • Multiboard - Set the width for multiboard item in column 7, row 3 to 1.00% of the total screen width
      • Multiboard - Set the width for multiboard item in column 8, row 3 to 5.50% of the total screen width
      • Multiboard - Set the width for multiboard item in column 9, row 3 to 4.50% of the total screen width
      • Multiboard - Set the width for multiboard item in column 10, row 3 to 1.00% of the total screen width
      • Multiboard - Set the width for multiboard item in column 11, row 3 to 1.00% of the total screen width
      • Multiboard - Set the width for multiboard item in column 12, row 3 to 1.00% of the total screen width
      • Multiboard - Set the width for multiboard item in column 13, row 3 to 1.00% of the total screen width
      • Multiboard - Set the width for multiboard item in column 14, row 3 to 1.00% of the total screen width
      • Multiboard - Set the width for multiboard item in column 15, row 3 to 2.00% of the total screen width
      • Multiboard - Set the width for multiboard item in column 16, row 3 to 2.00% of the total screen width
      • Multiboard - Set the width for multiboard item in column 17, row 3 to 0.00% of the total screen width
      • Multiboard - Set the width for multiboard item in column 18, row 3 to 0.00% of the total screen width
      • Multiboard - Set the width for multiboard item in column 19, row 3 to 0.00% of the total screen width
      • Multiboard - Set the width for multiboard item in column 20, row 3 to 0.00% of the total screen width
      • Multiboard - Set the width for multiboard item in column 21, row 3 to 0.00% of the total screen width
      • Multiboard - Set the icon for multiboard item in column 10, row 3 to war3mapImported\Blue-0-4.blp
      • Multiboard - Set the icon for multiboard item in column 11, row 3 to war3mapImported\Blue-0-4.blp
      • Multiboard - Set the icon for multiboard item in column 12, row 3 to war3mapImported\Blue-0-4.blp
      • Multiboard - Set the icon for multiboard item in column 13, row 3 to war3mapImported\Blue-0-4.blp
      • Multiboard - Set the icon for multiboard item in column 14, row 3 to war3mapImported\Blue-0-4.blp
      • Multiboard - Set the display style for multiboard item in column 15, row 3 to Hide text and Hide icons
      • Multiboard - Set the display style for multiboard item in column 1, row 3 to Show text and Hide icons
      • Multiboard - Set the display style for multiboard item in column 2, row 3 to Show text and Hide icons
      • Multiboard - Set the display style for multiboard item in column 8, row 3 to Show text and Hide icons
      • Multiboard - Set the display style for multiboard item in column 9, row 3 to Show text and Hide icons
      • Multiboard - Set the display style for multiboard item in column 16, row 3 to Show text and Hide icons
      • Multiboard - Set the display style for multiboard item in column 17, row 3 to Hide text and Hide icons
      • Multiboard - Set the display style for multiboard item in column 18, row 3 to Hide text and Hide icons
      • Multiboard - Set the display style for multiboard item in column 19, row 3 to Hide text and Hide icons
      • Multiboard - Set the display style for multiboard item in column 20, row 3 to Hide text and Hide icons
      • Multiboard - Set the display style for multiboard item in column 21, row 3 to Hide text and Hide icons
      • Multiboard - Set the icon for multiboard item in column 3, row 3 to war3mapImported\Blue-0-4.blp
      • Multiboard - Set the icon for multiboard item in column 4, row 3 to war3mapImported\Blue-0-4.blp
      • Multiboard - Set the icon for multiboard item in column 5, row 3 to war3mapImported\Blue-0-4.blp
      • Multiboard - Set the icon for multiboard item in column 6, row 3 to war3mapImported\Blue-0-4.blp
      • Multiboard - Set the icon for multiboard item in column 7, row 3 to war3mapImported\Blue-0-4.blp
ROW 3
  • Row 4
    • Events
      • Time - Elapsed game time is 0.15 seconds
    • Conditions
    • Actions
      • Multiboard - Set the width for multiboard item in column 1, row 4 to 1.70% of the total screen width
      • Multiboard - Set the width for multiboard item in column 2, row 4 to 1.00% of the total screen width
      • Multiboard - Set the width for multiboard item in column 3, row 4 to 1.00% of the total screen width
      • Multiboard - Set the width for multiboard item in column 4, row 4 to 1.00% of the total screen width
      • Multiboard - Set the width for multiboard item in column 5, row 4 to 1.00% of the total screen width
      • Multiboard - Set the width for multiboard item in column 6, row 4 to 1.00% of the total screen width
      • Multiboard - Set the width for multiboard item in column 7, row 4 to 1.00% of the total screen width
      • Multiboard - Set the width for multiboard item in column 8, row 4 to 1.00% of the total screen width
      • Multiboard - Set the width for multiboard item in column 9, row 4 to 1.00% of the total screen width
      • Multiboard - Set the width for multiboard item in column 10, row 4 to 2.00% of the total screen width
      • Multiboard - Set the width for multiboard item in column 11, row 4 to 2.25% of the total screen width
      • Multiboard - Set the width for multiboard item in column 12, row 4 to 2.25% of the total screen width
      • Multiboard - Set the width for multiboard item in column 13, row 4 to 2.25% of the total screen width
      • Multiboard - Set the width for multiboard item in column 14, row 4 to 2.25% of the total screen width
      • Multiboard - Set the width for multiboard item in column 15, row 4 to 2.25% of the total screen width
      • Multiboard - Set the width for multiboard item in column 16, row 4 to 2.25% of the total screen width
      • Multiboard - Set the width for multiboard item in column 17, row 4 to 2.25% of the total screen width
      • Multiboard - Set the width for multiboard item in column 18, row 4 to 2.25% of the total screen width
      • Multiboard - Set the width for multiboard item in column 19, row 4 to 2.25% of the total screen width
      • Multiboard - Set the width for multiboard item in column 20, row 4 to 0.00% of the total screen width
      • Multiboard - Set the width for multiboard item in column 21, row 4 to 0.00% of the total screen width
      • Multiboard - Set the display style for multiboard item in column 1, row 4 to Hide text and Hide icons
      • Multiboard - Set the display style for multiboard item in column 10, row 4 to Hide text and Hide icons
      • Multiboard - Set the display style for multiboard item in column 20, row 4 to Hide text and Hide icons
      • Multiboard - Set the display style for multiboard item in column 21, row 4 to Hide text and Hide icons
      • Multiboard - Hide multiboard
      • Multiboard - Show multiboard




JASS PARTS

Hero initilization
JASS:
function Trig_MiscPlayer_Actions takes nothing returns nothing
    set udg_TargetingHero[0] = gg_unit_Hmkg_0001
    call MultiboardSetItemValueBJ( udg_multiboard, 2, 1, "TRIGSTR_008" )
    call MultiboardSetItemIconBJ( udg_multiboard, 2, 1, "ReplaceableTextures\\CommandButtons\\BTNHeroMountainKing.blp" )
endfunction

//===========================================================================
function InitTrig_MiscPlayer takes nothing returns nothing
    set gg_trg_MiscPlayer = CreateTrigger(  )
    call TriggerRegisterTimerEventSingle( gg_trg_MiscPlayer, 0.17 )
    call TriggerAddAction( gg_trg_MiscPlayer, function Trig_MiscPlayer_Actions )
endfunction

Player Selection
Owner Mana
JASS:
function Trig_Untitled_Trigger_002_Actions takes nothing returns nothing
    local real maxmana
    local real mana
    local real coefr
    local integer coef
    local integer full
    local integer fra
    local string frac
    set maxmana = GetUnitState(udg_TargetingHero[0], UNIT_STATE_MAX_MANA)
    set mana = GetUnitState(udg_TargetingHero[0], UNIT_STATE_MANA)
    call MultiboardSetItemValueBJ( udg_multiboard, 2, 3, ( I2S(R2I(mana)) + "/" + I2S(R2I(maxmana)) ) )
    set coefr = (( mana / maxmana) * 20)
    set coef = R2I(coefr)
        if coef == 0 then
        call MultiboardSetItemIconBJ( udg_multiboard, 7, 3, "war3mapImported\\Blue-0-4.blp" )
        call MultiboardSetItemIconBJ( udg_multiboard, 6, 3, "war3mapImported\\Blue-0-4.blp" )
        call MultiboardSetItemIconBJ( udg_multiboard, 5, 3, "war3mapImported\\Blue-0-4.blp" )
        call MultiboardSetItemIconBJ( udg_multiboard, 4, 3, "war3mapImported\\Blue-0-4.blp" )
        call MultiboardSetItemIconBJ( udg_multiboard, 3, 3, "war3mapImported\\Blue-0-4.blp" )
        return
        elseif coef<=3 then
        set full = 0
        elseif coef<=7 then
        set full = 1
        elseif coef<=11 then
        set full = 2
        elseif coef<=15 then
        set full = 3
        elseif coef<=19 then
        set full = 4
        elseif coef==20 then
        set full = 5
        endif
    set fra = coef-(4*full)
        if fra == 0 then
        set frac = "war3mapImported\\Blue-0-4.blp"
        elseif fra == 1 then
        set frac = "war3mapImported\\Blue-1-4.blp"
        elseif fra == 2 then
        set frac = "war3mapImported\\Blue-2-4.blp"
        elseif fra == 3 then
        set frac = "war3mapImported\\Blue-3-4.blp"
        endif
            if full == 0 then
            call MultiboardSetItemIconBJ( udg_multiboard, 7, 3, "war3mapImported\\Blue-0-4.blp" )
            call MultiboardSetItemIconBJ( udg_multiboard, 6, 3, "war3mapImported\\Blue-0-4.blp" )
            call MultiboardSetItemIconBJ( udg_multiboard, 5, 3, "war3mapImported\\Blue-0-4.blp" )
            call MultiboardSetItemIconBJ( udg_multiboard, 4, 3, "war3mapImported\\Blue-0-4.blp" )
            call MultiboardSetItemIconBJ( udg_multiboard, 3, 3, frac )
            elseif full == 1 then
            call MultiboardSetItemIconBJ( udg_multiboard, 7, 3, "war3mapImported\\Blue-0-4.blp" )
            call MultiboardSetItemIconBJ( udg_multiboard, 6, 3, "war3mapImported\\Blue-0-4.blp" )
            call MultiboardSetItemIconBJ( udg_multiboard, 5, 3, "war3mapImported\\Blue-0-4.blp" )
            call MultiboardSetItemIconBJ( udg_multiboard, 4, 3, frac )
            call MultiboardSetItemIconBJ( udg_multiboard, 3, 3, "war3mapImported\\Blue-4-4.blp" )
            elseif full == 2 then
            call MultiboardSetItemIconBJ( udg_multiboard, 7, 3, "war3mapImported\\Blue-0-4.blp" )
            call MultiboardSetItemIconBJ( udg_multiboard, 6, 3, "war3mapImported\\Blue-0-4.blp" )
            call MultiboardSetItemIconBJ( udg_multiboard, 5, 3, frac )
            call MultiboardSetItemIconBJ( udg_multiboard, 4, 3, "war3mapImported\\Blue-4-4.blp" )
            call MultiboardSetItemIconBJ( udg_multiboard, 3, 3, "war3mapImported\\Blue-4-4.blp" )
            elseif full == 3 then
            call MultiboardSetItemIconBJ( udg_multiboard, 7, 3, "war3mapImported\\Blue-0-4.blp" )
            call MultiboardSetItemIconBJ( udg_multiboard, 6, 3, frac )
            call MultiboardSetItemIconBJ( udg_multiboard, 5, 3, "war3mapImported\\Blue-4-4.blp" )
            call MultiboardSetItemIconBJ( udg_multiboard, 4, 3, "war3mapImported\\Blue-4-4.blp" )
            call MultiboardSetItemIconBJ( udg_multiboard, 3, 3, "war3mapImported\\Blue-4-4.blp" )
            elseif full == 4 then
            call MultiboardSetItemIconBJ( udg_multiboard, 7, 3, frac )
            call MultiboardSetItemIconBJ( udg_multiboard, 6, 3, "war3mapImported\\Blue-4-4.blp" )
            call MultiboardSetItemIconBJ( udg_multiboard, 5, 3, "war3mapImported\\Blue-4-4.blp" )
            call MultiboardSetItemIconBJ( udg_multiboard, 4, 3, "war3mapImported\\Blue-4-4.blp" )
            call MultiboardSetItemIconBJ( udg_multiboard, 3, 3, "war3mapImported\\Blue-4-4.blp" )
            elseif full == 5 then
            call MultiboardSetItemIconBJ( udg_multiboard, 7, 3, "war3mapImported\\Blue-4-4.blp" )
            call MultiboardSetItemIconBJ( udg_multiboard, 6, 3, "war3mapImported\\Blue-4-4.blp" )
            call MultiboardSetItemIconBJ( udg_multiboard, 5, 3, "war3mapImported\\Blue-4-4.blp" )
            call MultiboardSetItemIconBJ( udg_multiboard, 4, 3, "war3mapImported\\Blue-4-4.blp" )
            call MultiboardSetItemIconBJ( udg_multiboard, 3, 3, "war3mapImported\\Blue-4-4.blp" )
            endif
endfunction

//===========================================================================
function InitTrig_mana takes nothing returns nothing
    set gg_trg_mana = CreateTrigger(  )
    call TriggerRegisterTimerEventPeriodic( gg_trg_mana, 0.08 )
    call TriggerAddAction( gg_trg_mana, function Trig_Untitled_Trigger_002_Actions )
endfunction

Owner Life
JASS:
function Trig_Untitled_Trigger_001_Actions takes nothing returns nothing
    local real maxlife
    local real life
    local real coefr
    local integer coef
    local integer full
    local integer fra
    local string frac
    set maxlife = GetUnitState(udg_TargetingHero[0], UNIT_STATE_MAX_LIFE)
    set life = GetUnitState(udg_TargetingHero[0], UNIT_STATE_LIFE)
    call MultiboardSetItemValueBJ( udg_multiboard, 2, 2, ( I2S(R2I(life)) + "/" + I2S(R2I(maxlife)) ) )
    set coefr = (( life / maxlife) * 20)
    set coef = R2I(coefr)
        if coef == 0 then
        call MultiboardSetItemIconBJ( udg_multiboard, 7, 2, "war3mapImported\\Green-0-4.blp" )
        call MultiboardSetItemIconBJ( udg_multiboard, 6, 2, "war3mapImported\\Green-0-4.blp" )
        call MultiboardSetItemIconBJ( udg_multiboard, 5, 2, "war3mapImported\\Green-0-4.blp" )
        call MultiboardSetItemIconBJ( udg_multiboard, 4, 2, "war3mapImported\\Green-0-4.blp" )
        call MultiboardSetItemIconBJ( udg_multiboard, 3, 2, "war3mapImported\\Green-0-4.blp" )
        return
        elseif coef<4 then
        set full = 0
        elseif coef<8 then
        set full = 1
        elseif coef<12 then
        set full = 2
        elseif coef<16 then
        set full = 3
        elseif coef<20 then
        set full = 4
        elseif coef==20 then
        set full = 5
        endif
    set fra = coef-(4*full)
        if fra == 0 then
        set frac = "war3mapImported\\Green-0-4.blp"
        elseif fra == 1 then
        set frac = "war3mapImported\\Green-1-4.blp"
        elseif fra == 2 then
        set frac = "war3mapImported\\Green-2-4.blp"
        elseif fra == 3 then
        set frac = "war3mapImported\\Green-3-4.blp"
        endif
            if full == 0 then
            call MultiboardSetItemIconBJ( udg_multiboard, 7, 2, "war3mapImported\\Green-0-4.blp" )
            call MultiboardSetItemIconBJ( udg_multiboard, 6, 2, "war3mapImported\\Green-0-4.blp" )
            call MultiboardSetItemIconBJ( udg_multiboard, 5, 2, "war3mapImported\\Green-0-4.blp" )
            call MultiboardSetItemIconBJ( udg_multiboard, 4, 2, "war3mapImported\\Green-0-4.blp" )
            call MultiboardSetItemIconBJ( udg_multiboard, 3, 2, frac )
            elseif full == 1 then
            call MultiboardSetItemIconBJ( udg_multiboard, 7, 2, "war3mapImported\\Green-0-4.blp" )
            call MultiboardSetItemIconBJ( udg_multiboard, 6, 2, "war3mapImported\\Green-0-4.blp" )
            call MultiboardSetItemIconBJ( udg_multiboard, 5, 2, "war3mapImported\\Green-0-4.blp" )
            call MultiboardSetItemIconBJ( udg_multiboard, 4, 2, frac )
            call MultiboardSetItemIconBJ( udg_multiboard, 3, 2, "war3mapImported\\Green-4-4.blp" )
            elseif full == 2 then
            call MultiboardSetItemIconBJ( udg_multiboard, 7, 2, "war3mapImported\\Green-0-4.blp" )
            call MultiboardSetItemIconBJ( udg_multiboard, 6, 2, "war3mapImported\\Green-0-4.blp" )
            call MultiboardSetItemIconBJ( udg_multiboard, 5, 2, frac )
            call MultiboardSetItemIconBJ( udg_multiboard, 4, 2, "war3mapImported\\Green-4-4.blp" )
            call MultiboardSetItemIconBJ( udg_multiboard, 3, 2, "war3mapImported\\Green-4-4.blp" )
            elseif full == 3 then
            call MultiboardSetItemIconBJ( udg_multiboard, 7, 2, "war3mapImported\\Green-0-4.blp" )
            call MultiboardSetItemIconBJ( udg_multiboard, 6, 2, frac )
            call MultiboardSetItemIconBJ( udg_multiboard, 5, 2, "war3mapImported\\Green-4-4.blp" )
            call MultiboardSetItemIconBJ( udg_multiboard, 4, 2, "war3mapImported\\Green-4-4.blp" )
            call MultiboardSetItemIconBJ( udg_multiboard, 3, 2, "war3mapImported\\Green-4-4.blp" )
            elseif full == 4 then
            call MultiboardSetItemIconBJ( udg_multiboard, 7, 2, frac )
            call MultiboardSetItemIconBJ( udg_multiboard, 6, 2, "war3mapImported\\Green-4-4.blp" )
            call MultiboardSetItemIconBJ( udg_multiboard, 5, 2, "war3mapImported\\Green-4-4.blp" )
            call MultiboardSetItemIconBJ( udg_multiboard, 4, 2, "war3mapImported\\Green-4-4.blp" )
            call MultiboardSetItemIconBJ( udg_multiboard, 3, 2, "war3mapImported\\Green-4-4.blp" )
            elseif full == 5 then
            call MultiboardSetItemIconBJ( udg_multiboard, 7, 2, "war3mapImported\\Green-4-4.blp" )
            call MultiboardSetItemIconBJ( udg_multiboard, 6, 2, "war3mapImported\\Green-4-4.blp" )
            call MultiboardSetItemIconBJ( udg_multiboard, 5, 2, "war3mapImported\\Green-4-4.blp" )
            call MultiboardSetItemIconBJ( udg_multiboard, 4, 2, "war3mapImported\\Green-4-4.blp" )
            call MultiboardSetItemIconBJ( udg_multiboard, 3, 2, "war3mapImported\\Green-4-4.blp" )
            endif
endfunction

//===========================================================================
function InitTrig_life takes nothing returns nothing
    set gg_trg_life = CreateTrigger(  )
    call TriggerRegisterTimerEventPeriodic( gg_trg_life, 0.08 )
    call TriggerAddAction( gg_trg_life, function Trig_Untitled_Trigger_001_Actions )
endfunction

Now the hard parts..

For Targeted Unit

This Runs when a target is selected
JASS:
function Trig_MiscTarget_Actions takes nothing returns nothing
    local unit test
    local integer icon1
    set test = GetTriggerUnit()
    if test == udg_TargetingHero[0] then
    return
    endif
    if test == udg_TargetedUnit[0] then
    call SelectUnit(test, false)
    call SelectUnit(udg_TargetingHero[0], true)
    return
    endif
    call DestroyEffect(udg_se[0])
    set udg_TargetedUnit[0] =  test
    set udg_Unitselected[0] = 1.00
    call SelectUnit(test, false)
    call SelectUnit(udg_TargetingHero[0], true)
    set udg_se[0] = CreateCircle(Player(0), test)
    set icon1 = GetUnitPointValue(test)
    call MultiboardSetItemIconBJ( udg_multiboard, 5, 1, icon[icon1] )
    call MultiboardSetItemValueBJ( udg_multiboard, 5, 1, name[icon1] )
    endfunction

//===========================================================================
function InitTrig_MiscTarget takes nothing returns nothing
    set gg_trg_MiscTarget = CreateTrigger(  )
    call TriggerRegisterPlayerSelectionEventBJ( gg_trg_MiscTarget, Player(0), true )
    call TriggerAddAction( gg_trg_MiscTarget, function Trig_MiscTarget_Actions )
endfunction

This function creates a circle below the feet of the target

JASS:
library createcircle
function CreateCircle takes player P,unit T returns effect
    local string S="war3mapImported\\SelectionCircleEnemyDeath.MDX"
    if P!=GetLocalPlayer()then
        set S=""
    endif
    return AddSpecialEffectTarget(S,T,"origin")
endfunction
endlibrary

This function is to destroy the model
JASS:
function Trig_UnitSelected_Actions takes nothing returns nothing
call DestroyEffect(udg_se[0])
endfunction

//===========================================================================
function InitTrig_UnitSelected takes nothing returns nothing
    set gg_trg_UnitSelected = CreateTrigger(  )
    call TriggerRegisterVariableEvent( gg_trg_UnitSelected, "udg_Unitselected", EQUAL, 0 )
    call TriggerAddAction( gg_trg_UnitSelected, function Trig_UnitSelected_Actions )
endfunction

This is when the owning hero attacks a target first
JASS:
function Trig_AttackFirst_Actions takes nothing returns nothing
local integer icon1
local unit test
    if ( udg_source == udg_TargetingHero[0] ) then
    if (udg_Unitselected[0] == 0.00) then
    set udg_TargetedUnit[0] = udg_target
    set test = udg_TargetedUnit[0]
    set udg_se[0] = CreateCircle(Player(0), test)
        if (GetUnitPointValue(udg_target) == 0) then
        set icon1 = GetUnitUserData(udg_target)
        else
        set icon1 = GetUnitPointValue(udg_target)
        endif
    call MultiboardSetItemIconBJ( udg_multiboard, 5, 1, icon[icon1] )
    call MultiboardSetItemValueBJ( udg_multiboard, 5, 1, name[icon1] )
    set udg_Unitselected[0] = 1.00
    endif
    endif
endfunction

//===========================================================================
function InitTrig_AttackFirst takes nothing returns nothing
    set gg_trg_AttackFirst = CreateTrigger(  )
    call TriggerRegisterVariableEvent( gg_trg_AttackFirst, "udg_damageEventTrigger", EQUAL, 1.00 )
    call TriggerAddAction( gg_trg_AttackFirst, function Trig_AttackFirst_Actions )
endfunction

This is the life of the targeted Unit
JASS:
function Trig_LifeTarget_Conditions takes nothing returns boolean
    if (udg_Unitselected[0] == 1.00) then
        return true
    endif
    return false
endfunction

function Trig_LifeTarget_Actions takes nothing returns nothing
    local real maxlife
    local real life
    local real coefr
    local integer coef
    local integer full
    local integer fra
    local string frac
    set maxlife = GetUnitState(udg_TargetedUnit[0], UNIT_STATE_MAX_LIFE)
    set life = GetUnitState(udg_TargetedUnit[0], UNIT_STATE_LIFE)
    call MultiboardSetItemValueBJ( udg_multiboard, 9, 2, ( I2S(R2I(life)) + "/" + I2S(R2I(maxlife)) ) )
    set coefr = (( life / maxlife) * 20)
    set coef = R2I(coefr)
        if coef == 0 then
        call MultiboardSetItemIconBJ( udg_multiboard, 14, 2, "war3mapImported\\Green-0-4.blp" )
        call MultiboardSetItemIconBJ( udg_multiboard, 13, 2, "war3mapImported\\Green-0-4.blp" )
        call MultiboardSetItemIconBJ( udg_multiboard, 12, 2, "war3mapImported\\Green-0-4.blp" )
        call MultiboardSetItemIconBJ( udg_multiboard, 11, 2, "war3mapImported\\Green-0-4.blp" )
        call MultiboardSetItemIconBJ( udg_multiboard, 10, 2, "war3mapImported\\Green-0-4.blp" )
        return
        elseif coef<4 then
        set full = 0
        elseif coef<8 then
        set full = 1
        elseif coef<12 then
        set full = 2
        elseif coef<16 then
        set full = 3
        elseif coef<20 then
        set full = 4
        elseif coef==20 then
        set full = 5
        endif
    set fra = coef-(4*full)
        if fra == 0 then
        set frac = "war3mapImported\\Green-0-4.blp"
        elseif fra == 1 then
        set frac = "war3mapImported\\Green-1-4.blp"
        elseif fra == 2 then
        set frac = "war3mapImported\\Green-2-4.blp"
        elseif fra == 3 then
        set frac = "war3mapImported\\Green-3-4.blp"
        endif
            if full == 0 then
            call MultiboardSetItemIconBJ( udg_multiboard, 14, 2, "war3mapImported\\Green-0-4.blp" )
            call MultiboardSetItemIconBJ( udg_multiboard, 13, 2, "war3mapImported\\Green-0-4.blp" )
            call MultiboardSetItemIconBJ( udg_multiboard, 12, 2, "war3mapImported\\Green-0-4.blp" )
            call MultiboardSetItemIconBJ( udg_multiboard, 11, 2, "war3mapImported\\Green-0-4.blp" )
            call MultiboardSetItemIconBJ( udg_multiboard, 10, 2, frac )
            elseif full == 1 then
            call MultiboardSetItemIconBJ( udg_multiboard, 14, 2, "war3mapImported\\Green-0-4.blp" )
            call MultiboardSetItemIconBJ( udg_multiboard, 13, 2, "war3mapImported\\Green-0-4.blp" )
            call MultiboardSetItemIconBJ( udg_multiboard, 12, 2, "war3mapImported\\Green-0-4.blp" )
            call MultiboardSetItemIconBJ( udg_multiboard, 11, 2, frac )
            call MultiboardSetItemIconBJ( udg_multiboard, 10, 2, "war3mapImported\\Green-4-4.blp" )
            elseif full == 2 then
            call MultiboardSetItemIconBJ( udg_multiboard, 14, 2, "war3mapImported\\Green-0-4.blp" )
            call MultiboardSetItemIconBJ( udg_multiboard, 13, 2, "war3mapImported\\Green-0-4.blp" )
            call MultiboardSetItemIconBJ( udg_multiboard, 12, 2, frac )
            call MultiboardSetItemIconBJ( udg_multiboard, 11, 2, "war3mapImported\\Green-4-4.blp" )
            call MultiboardSetItemIconBJ( udg_multiboard, 10, 2, "war3mapImported\\Green-4-4.blp" )
            elseif full == 3 then
            call MultiboardSetItemIconBJ( udg_multiboard, 14, 2, "war3mapImported\\Green-0-4.blp" )
            call MultiboardSetItemIconBJ( udg_multiboard, 13, 2, frac )
            call MultiboardSetItemIconBJ( udg_multiboard, 12, 2, "war3mapImported\\Green-4-4.blp" )
            call MultiboardSetItemIconBJ( udg_multiboard, 11, 2, "war3mapImported\\Green-4-4.blp" )
            call MultiboardSetItemIconBJ( udg_multiboard, 10, 2, "war3mapImported\\Green-4-4.blp" )
            elseif full == 4 then
            call MultiboardSetItemIconBJ( udg_multiboard, 14, 2, frac )
            call MultiboardSetItemIconBJ( udg_multiboard, 13, 2, "war3mapImported\\Green-4-4.blp" )
            call MultiboardSetItemIconBJ( udg_multiboard, 12, 2, "war3mapImported\\Green-4-4.blp" )
            call MultiboardSetItemIconBJ( udg_multiboard, 11, 2, "war3mapImported\\Green-4-4.blp" )
            call MultiboardSetItemIconBJ( udg_multiboard, 10, 2, "war3mapImported\\Green-4-4.blp" )
            elseif full == 5 then
            call MultiboardSetItemIconBJ( udg_multiboard, 14, 2, "war3mapImported\\Green-4-4.blp" )
            call MultiboardSetItemIconBJ( udg_multiboard, 13, 2, "war3mapImported\\Green-4-4.blp" )
            call MultiboardSetItemIconBJ( udg_multiboard, 12, 2, "war3mapImported\\Green-4-4.blp" )
            call MultiboardSetItemIconBJ( udg_multiboard, 11, 2, "war3mapImported\\Green-4-4.blp" )
            call MultiboardSetItemIconBJ( udg_multiboard, 10, 2, "war3mapImported\\Green-4-4.blp" )
            endif
endfunction

//===========================================================================
function InitTrig_LifeTarget takes nothing returns nothing
    set gg_trg_LifeTarget = CreateTrigger(  )
    call TriggerRegisterTimerEventPeriodic( gg_trg_LifeTarget, 0.08 )
    call TriggerAddCondition( gg_trg_LifeTarget, Condition( function Trig_LifeTarget_Conditions ) )
    call TriggerAddAction( gg_trg_LifeTarget, function Trig_LifeTarget_Actions )
endfunction

This is Mana

JASS:
function Trig_ManaTarget_Conditions takes nothing returns boolean
    if (  udg_Unitselected[0] == 1.00) then
    return true
    endif
    return false
endfunction

function Trig_ManaTarget_Actions takes nothing returns nothing
local real maxmana
    local real mana
    local real coefr
    local integer coef
    local integer full
    local integer fra
    local string frac
    set maxmana = GetUnitState(udg_TargetedUnit[0], UNIT_STATE_MAX_MANA)
    set mana = GetUnitState(udg_TargetedUnit[0], UNIT_STATE_MANA)
    call MultiboardSetItemValueBJ( udg_multiboard, 9, 3, ( I2S(R2I(mana)) + "/" + I2S(R2I(maxmana)) ) )
    set coefr = (( mana / maxmana) * 20)
    set coef = R2I(coefr)
        if coef == 0 then
        call MultiboardSetItemIconBJ( udg_multiboard, 14, 3, "war3mapImported\\Blue-0-4.blp" )
        call MultiboardSetItemIconBJ( udg_multiboard, 13, 3, "war3mapImported\\Blue-0-4.blp" )
        call MultiboardSetItemIconBJ( udg_multiboard, 12, 3, "war3mapImported\\Blue-0-4.blp" )
        call MultiboardSetItemIconBJ( udg_multiboard, 11, 3, "war3mapImported\\Blue-0-4.blp" )
        call MultiboardSetItemIconBJ( udg_multiboard, 10, 3, "war3mapImported\\Blue-0-4.blp" )
        return
        elseif coef<=3 then
        set full = 0
        elseif coef<=7 then
        set full = 1
        elseif coef<=11 then
        set full = 2
        elseif coef<=15 then
        set full = 3
        elseif coef<=19 then
        set full = 4
        elseif coef==20 then
        set full = 5
        endif
    set fra = coef-(4*full)
        if fra == 0 then
        set frac = "war3mapImported\\Blue-0-4.blp"
        elseif fra == 1 then
        set frac = "war3mapImported\\Blue-1-4.blp"
        elseif fra == 2 then
        set frac = "war3mapImported\\Blue-2-4.blp"
        elseif fra == 3 then
        set frac = "war3mapImported\\Blue-3-4.blp"
        endif
            if full == 0 then
            call MultiboardSetItemIconBJ( udg_multiboard, 14, 3, "war3mapImported\\Blue-0-4.blp" )
            call MultiboardSetItemIconBJ( udg_multiboard, 13, 3, "war3mapImported\\Blue-0-4.blp" )
            call MultiboardSetItemIconBJ( udg_multiboard, 12, 3, "war3mapImported\\Blue-0-4.blp" )
            call MultiboardSetItemIconBJ( udg_multiboard, 11, 3, "war3mapImported\\Blue-0-4.blp" )
            call MultiboardSetItemIconBJ( udg_multiboard, 10, 3, frac )
            elseif full == 1 then
            call MultiboardSetItemIconBJ( udg_multiboard, 14, 3, "war3mapImported\\Blue-0-4.blp" )
            call MultiboardSetItemIconBJ( udg_multiboard, 13, 3, "war3mapImported\\Blue-0-4.blp" )
            call MultiboardSetItemIconBJ( udg_multiboard, 12, 3, "war3mapImported\\Blue-0-4.blp" )
            call MultiboardSetItemIconBJ( udg_multiboard, 11, 3, frac )
            call MultiboardSetItemIconBJ( udg_multiboard, 10, 3, "war3mapImported\\Blue-4-4.blp" )
            elseif full == 2 then
            call MultiboardSetItemIconBJ( udg_multiboard, 14, 3, "war3mapImported\\Blue-0-4.blp" )
            call MultiboardSetItemIconBJ( udg_multiboard, 13, 3, "war3mapImported\\Blue-0-4.blp" )
            call MultiboardSetItemIconBJ( udg_multiboard, 12, 3, frac )
            call MultiboardSetItemIconBJ( udg_multiboard, 11, 3, "war3mapImported\\Blue-4-4.blp" )
            call MultiboardSetItemIconBJ( udg_multiboard, 10, 3, "war3mapImported\\Blue-4-4.blp" )
            elseif full == 3 then
            call MultiboardSetItemIconBJ( udg_multiboard, 14, 3, "war3mapImported\\Blue-0-4.blp" )
            call MultiboardSetItemIconBJ( udg_multiboard, 13, 3, frac )
            call MultiboardSetItemIconBJ( udg_multiboard, 12, 3, "war3mapImported\\Blue-4-4.blp" )
            call MultiboardSetItemIconBJ( udg_multiboard, 11, 3, "war3mapImported\\Blue-4-4.blp" )
            call MultiboardSetItemIconBJ( udg_multiboard, 10, 3, "war3mapImported\\Blue-4-4.blp" )
            elseif full == 4 then
            call MultiboardSetItemIconBJ( udg_multiboard, 14, 3, frac )
            call MultiboardSetItemIconBJ( udg_multiboard, 13, 3, "war3mapImported\\Blue-4-4.blp" )
            call MultiboardSetItemIconBJ( udg_multiboard, 12, 3, "war3mapImported\\Blue-4-4.blp" )
            call MultiboardSetItemIconBJ( udg_multiboard, 11, 3, "war3mapImported\\Blue-4-4.blp" )
            call MultiboardSetItemIconBJ( udg_multiboard, 10, 3, "war3mapImported\\Blue-4-4.blp" )
            elseif full == 5 then
            call MultiboardSetItemIconBJ( udg_multiboard, 14, 3, "war3mapImported\\Blue-4-4.blp" )
            call MultiboardSetItemIconBJ( udg_multiboard, 13, 3, "war3mapImported\\Blue-4-4.blp" )
            call MultiboardSetItemIconBJ( udg_multiboard, 12, 3, "war3mapImported\\Blue-4-4.blp" )
            call MultiboardSetItemIconBJ( udg_multiboard, 11, 3, "war3mapImported\\Blue-4-4.blp" )
            call MultiboardSetItemIconBJ( udg_multiboard, 10, 3, "war3mapImported\\Blue-4-4.blp" )
            endif
endfunction

//===========================================================================
function InitTrig_ManaTarget takes nothing returns nothing
    set gg_trg_ManaTarget = CreateTrigger(  )
    call TriggerRegisterTimerEventPeriodic( gg_trg_ManaTarget, 0.08 )
    call TriggerAddCondition( gg_trg_ManaTarget, Condition( function Trig_ManaTarget_Conditions ) )
    call TriggerAddAction( gg_trg_ManaTarget, function Trig_ManaTarget_Actions )
endfunction

This is to deselcet the target when it dies
JASS:
function Trig_DeathTarget_Actions takes nothing returns nothing
    local unit test
    set test = GetTriggerUnit()
    if test != udg_TargetedUnit[0] then
    return
    else
        call MultiboardSetItemIconBJ( udg_multiboard, 14, 2, "war3mapImported\\Green-0-4.blp" )
        call MultiboardSetItemIconBJ( udg_multiboard, 13, 2, "war3mapImported\\Green-0-4.blp" )
        call MultiboardSetItemIconBJ( udg_multiboard, 12, 2, "war3mapImported\\Green-0-4.blp" )
        call MultiboardSetItemIconBJ( udg_multiboard, 11, 2, "war3mapImported\\Green-0-4.blp" )
        call MultiboardSetItemIconBJ( udg_multiboard, 10, 2, "war3mapImported\\Green-0-4.blp" )
        call MultiboardSetItemIconBJ( udg_multiboard, 14, 3, "war3mapImported\\Blue-0-4.blp" )
        call MultiboardSetItemIconBJ( udg_multiboard, 13, 3, "war3mapImported\\Blue-0-4.blp" )
        call MultiboardSetItemIconBJ( udg_multiboard, 12, 3, "war3mapImported\\Blue-0-4.blp" )
        call MultiboardSetItemIconBJ( udg_multiboard, 11, 3, "war3mapImported\\Blue-0-4.blp" )
        call MultiboardSetItemIconBJ( udg_multiboard, 10, 3, "war3mapImported\\Blue-0-4.blp" )
        call MultiboardSetItemValueBJ( udg_multiboard, 9, 2, " " )
        call MultiboardSetItemValueBJ( udg_multiboard, 9, 3, " " )
        call MultiboardSetItemIconBJ( udg_multiboard, 5, 1, "ReplaceableTextures\\WorldEditUI\\Editor-Ally-NoPriority.blp" )
        call MultiboardSetItemValueBJ( udg_multiboard, 5, 1, "" )
        set udg_TargetedUnit[0] = null
        set udg_Unitselected[0] = 0
        endif
endfunction

//===========================================================================
function InitTrig_DeathTarget takes nothing returns nothing
    set gg_trg_DeathTarget = CreateTrigger(  )
    call TriggerRegisterAnyUnitEventBJ( gg_trg_DeathTarget, EVENT_PLAYER_UNIT_DEATH )
    call TriggerAddAction( gg_trg_DeathTarget, function Trig_DeathTarget_Actions )
endfunction

[SIZE="3"]

This is when the target moves 2000 distance away to deselect it[/SIZE]
JASS:
function Trig_DistanceTarget_Actions takes nothing returns nothing
local real x1
local real x2
local real y1
local real y2
local real distance
set x1 = GetUnitX(udg_TargetingHero[0])
set y1 = GetUnitY(udg_TargetingHero[0])
set x2 = GetUnitX(udg_TargetedUnit[0])
set y2 = GetUnitY(udg_TargetedUnit[0])
set distance = SquareRoot((((x2-x1)*(x2-x1))+((y2-y1)*(y2-y1))))
    if (distance > 2000) then
        call MultiboardSetItemIconBJ( udg_multiboard, 14, 2, "war3mapImported\\Green-0-4.blp" )
        call MultiboardSetItemIconBJ( udg_multiboard, 13, 2, "war3mapImported\\Green-0-4.blp" )
        call MultiboardSetItemIconBJ( udg_multiboard, 12, 2, "war3mapImported\\Green-0-4.blp" )
        call MultiboardSetItemIconBJ( udg_multiboard, 11, 2, "war3mapImported\\Green-0-4.blp" )
        call MultiboardSetItemIconBJ( udg_multiboard, 10, 2, "war3mapImported\\Green-0-4.blp" )
        call MultiboardSetItemIconBJ( udg_multiboard, 14, 3, "war3mapImported\\Blue-0-4.blp" )
        call MultiboardSetItemIconBJ( udg_multiboard, 13, 3, "war3mapImported\\Blue-0-4.blp" )
        call MultiboardSetItemIconBJ( udg_multiboard, 12, 3, "war3mapImported\\Blue-0-4.blp" )
        call MultiboardSetItemIconBJ( udg_multiboard, 11, 3, "war3mapImported\\Blue-0-4.blp" )
        call MultiboardSetItemIconBJ( udg_multiboard, 10, 3, "war3mapImported\\Blue-0-4.blp" )
        call MultiboardSetItemValueBJ( udg_multiboard, 9, 2, " " )
        call MultiboardSetItemValueBJ( udg_multiboard, 9, 3, " " )
        call MultiboardSetItemIconBJ( udg_multiboard, 5, 1, "ReplaceableTextures\\WorldEditUI\\Editor-Ally-NoPriority.blp" )
        call MultiboardSetItemValueBJ( udg_multiboard, 5, 1, "" )
        set udg_TargetedUnit[0] = null
        set udg_Unitselected[0] = 0
    endif
endfunction

//===========================================================================
function InitTrig_DistanceTarget takes nothing returns nothing
    set gg_trg_DistanceTarget = CreateTrigger(  )
    call TriggerRegisterTimerEventPeriodic( gg_trg_DistanceTarget, 1.00 )
    call TriggerAddAction( gg_trg_DistanceTarget, function Trig_DistanceTarget_Actions )
endfunction


It might not be efficient and might have errors and leaks. I will repair it over time. I hate to work with multiboards due to those red text..

If its not possible to make it MUI, i can make 8 of those multiboards though. One for each player.
 
Last edited:
Level 29
Joined
Oct 24, 2012
Messages
6,543
If ur using Jass get rid of all the BJs. They are for GUIers. The red text is the BJs lol. You can get rid of them. Making a multiboard MUI is just insane lol. That means u will need 8 multiboards per unit. When unit dies or gets removed u will need to destroy the old multiboard. Also to update all the multiboards will be horrific. Think about having 100 units on the map. U will have to make 800 multiboards.

If u want to make it MUI only for Heroes instead make it MPI and when a player gets a second hero increase the mb size.
You might want to learn how to do multiboards in Jass. It is easy. That way u can get rid of those BJs. If u dont understand something just ask.

As for ur problem tho.
If ur trying to detect mana percent just do. ( mana / max mana) * 100))
to display it if u have a multiboard for each player. local integer p = GetPlayerId( GetTriggeringPlayer())
Then set the multiboard to edit using p. This will only work if u create the multiboards and put them in an array.
If u have one single multiboard do. row = p + 1
So if player is player 1 (red) it will be 0 + 1 so it will edit the field in row 1
 
Level 7
Joined
Aug 19, 2009
Messages
278
Its not like that. MUI means i just need 1 multiboard per player. Test this map you will understand.

You hero is the 2nd Mountain king. Click on those footman you will see there icon, life and mana updating in your multiboard. And If you get damage your life and mana would decrease. Any unit you select will get a selection circle below it.
 
Level 7
Joined
Aug 19, 2009
Messages
278
one multiboard per player is MPI not MUI.

Here is a image on how it works.


newbitmapimagetl.jpg


So you advice making 10 muiltiboards are easier than making this mpi?
 
Level 7
Joined
Aug 19, 2009
Messages
278
Then use a multiboard array.

multiboard[0] is for player(1) red.
multiboard[1] is for player(2) blue.
and so on.
Then to update it use
local integer p + GetPlayerId( GetTreiggeringPlayer())
then u change row 1, column 1 of the multiboard for the player.

and plz use hidden tags on that picture

That was helpful.. Thanks... Didn't thought of that.
 
Level 7
Joined
Aug 19, 2009
Messages
278
np hope it works for ya. U should really try to write in pure Jass tho and get rid of all of those BJs lol.

Yup those red things give headache. I thought chaning them to jass was easy.

I need to write 2 functions in jass one for item and another for icon then then replace the existing functions with the old functions present.
 
Level 7
Joined
Aug 19, 2009
Messages
278
  • Set Player_A = Player 1 (Red)
  • Custom script: if GetLocalPlayer()==Player(udg_Player_A) then
  • Multiboard - Show Board[1]
  • Custom script: endif
You have to make sure you do not set any variables that may affect other players as it will crash the game.

You basically make 12 multiboards, then show the right one to the right player.


PS: Also I would not mix custom text and GUI triggers as it makes it very annoying to help you lol...

Ya basically will do that. Thanks.. :D I solved in the other sub-fourms By mistake i had written it here.
 
Level 7
Joined
Aug 19, 2009
Messages
278

Attachments

  • Multiboard(complete).w3x
    88.4 KB · Views: 48
Last edited:
Level 7
Joined
Aug 19, 2009
Messages
278
Multiboard system working for all players

I have made a multi-board system that shows the life and mana bar of your hero unit and the unit you selected. Can some one test it in multiplayer if its works perfectly or not.

My kloader is not working..



Btw I am getting another problem. There are some maps I can open in frozenthrone while others I can't. No player list appears below them. Both of those maps were saved by me.
 

Attachments

  • Multiboard(complete).w3x
    85.4 KB · Views: 55
Level 7
Joined
Aug 19, 2009
Messages
278
this is ur third post about this. Plz do not double post it is against the rules.

But the topic is different. That other one was in triggers and scripts. This is for some one to check if it works in multiplayer or not. I tried with kloader but my kloader doesn't work for some reason.

There is no other way I could check it.

And for the one on the requests was posted by mistake. I don't know how to ask a mod to move it so...
 
Status
Not open for further replies.
Top