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

Show Allied Hero Icons like on some ORPGs...

Level 3
Joined
Oct 19, 2012
Messages
11
function Trig_Show_Friendly_Hero_Icon_Actions takes nothing returns nothing
call SetReservedLocalHeroButtons(0)

call ShowHeroIconForPlayer(Player(0), Player(1))
call ShowHeroIconForPlayer(Player(0), Player(5))
call ShowHeroIconForPlayer(Player(0), Player(6))

call ShowHeroIconForPlayer(Player(1), Player(0))
call ShowHeroIconForPlayer(Player(1), Player(5))
call ShowHeroIconForPlayer(Player(1), Player(6))

call ShowHeroIconForPlayer(Player(5), Player(0))
call ShowHeroIconForPlayer(Player(5), Player(1))
call ShowHeroIconForPlayer(Player(5), Player(6))

call ShowHeroIconForPlayer(Player(6), Player(0))
call ShowHeroIconForPlayer(Player(6), Player(1))
call ShowHeroIconForPlayer(Player(6), Player(5))



call CreateMultiboardBJ( 1, 1, " " )
call MultiboardDisplayBJ( true, GetLastCreatedMultiboard() )
call MultiboardDisplayBJ( false, GetLastCreatedMultiboard() )
call DestroyMultiboardBJ( GetLastCreatedMultiboard() )
endfunction


function InitTrig_Show_Friendly_Hero_Icon takes nothing returns nothing
set gg_trg_Show_Friendly_Hero_Icon = CreateTrigger( )
call TriggerRegisterTimerEventSingle( gg_trg_Show_Friendly_Hero_Icon, 0.01)
call TriggerAddAction( gg_trg_Show_Friendly_Hero_Icon, function Trig_Show_Friendly_Hero_Icon_Actions )
endfunction

function ShowHeroIconForPlayer takes player sourcePlayer, player otherPlayer returns nothing
call SetPlayerAllianceStateAllyBJ(sourcePlayer, otherPlayer, true)
call SetPlayerAllianceStateVisionBJ(sourcePlayer, otherPlayer, true)
call SetPlayerAllianceStateControlBJ(sourcePlayer, otherPlayer, false)
call SetPlayerAllianceStateFullControlBJ(sourcePlayer, otherPlayer, true)
endfunction
Last edited:
Top