Hero icon (F1, F2, etc.) of allies?

RailKill

New Member
Reaction score
0
I wanted to make the hero icons, those that appear on the top left side of your screen which can be selected with F1, F2, F3 and so on, to show.

There are 5 players, and each player can only possess one hero, so there will be a total of 5 icons at the top left side of the screen. How do you make it like this without being able to control other allies' units?
 

aliminator8

New Member
Reaction score
3
Make a dummy hero for all hero's.
Dummy stats don't matter because it will act as a selection reroute,
therefore u will not be able to select this 'dummy' hero.

Make it that when a Player chooses a hero it creates the 'dummy' of that hero for each other player.
Then make it when a Dummy Hero is selected make player deselect dummy and select the real hero

Just use unit array variables and this should be simple :)
 

RailKill

New Member
Reaction score
0
thanks, its a great idea but...

well not exactly what i want because the HP and mana of the heroes can be seen at the top left side of the screen, if i were to make a dummy hero, i would have to make a periodic event of maybe 0.03 secs or 0.5 or 1 sec to update the HP and mana points...i can do it but...i was just thinking if there's any other way than using periodic event to update the HP and mana of each hero.
 

Tooblet

Active Member
Reaction score
6
I was looking for this exact thing. Just so a healer class can easily see witch ally has low HP and/or mana.

Beeing a healer in a wc3 rpg and pressing down Alt all the time and trying to target the right friend isnt really fun...
 

Vaius

New Member
Reaction score
19
I was looking for this exact thing. Just so a healer class can easily see witch ally has low HP and/or mana.

Beeing a healer in a wc3 rpg and pressing down Alt all the time and trying to target the right friend isnt really fun...

Or, you can set Options > Gameplay > "Always show Health Bars."
 

Kikac_NNGK

Well-Known Member
Reaction score
33
use in trigger thread the players as ally with full sharred vision and shared unit (i think it was something like that)
 

Tooblet

Active Member
Reaction score
6
yeah the gameplay constants I already changed.
But still, would be more cool to have icons to the left with all the heroes of the allies visible. somehow working with save/load and cameras and all.
 

bOb666777

Stand against the ugly world domination face!
Reaction score
117
thanks, its a great idea but...

well not exactly what i want because the HP and mana of the heroes can be seen at the top left side of the screen, if i were to make a dummy hero, i would have to make a periodic event of maybe 0.03 secs or 0.5 or 1 sec to update the HP and mana points...i can do it but...i was just thinking if there's any other way than using periodic event to update the HP and mana of each hero.

Why would you want another way to do it? This one is alright.
something like 0.1 periodics is good. Doesn't have to be THAT accurate, and at the same time 0.1 isn't laggy
 

Tooblet

Active Member
Reaction score
6
Even if it's nice with a periodic whatever so I can see the icons with HP and Mana of the allies on my screen.
Wouldn't it be like.. very very hard to make it work with every spell and whatever, checking range and all.
Cause I take it ull need a dummy unit of every hero with locust and redirect all the spells and whatever to the "real" hero.
or something.. Or how else would u do it?
 

bOb666777

Stand against the ugly world domination face!
Reaction score
117
Huh?? You mean if you target the icon of your dummy? Because enemies would target the real hero in battle.

What you can do is a trigger like this:
Trigger:
  • Redirect Orders
    • Events
      • Unit - A unit Is issued an order targeting an object
    • Conditions
    • Actions
      • For each (Integer A) from 1 to 10, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Target unit of issued order) Equal to DummyHero[(Integer A)]
            • Then - Actions
              • Custom script: call IssueTargetOrder( GetOrderedUnit(), OrderId2String(GetIssuedOrderId()), udg_HeroUnit[bj_forLoopAIndex]() )
            • Else - Actions


DummyHero is an array of type unit, each index is the dummy hero for each player (ex: DummyHero[2] is player 2's hero icon) (Note: they must all be owned by a computer ally who shares control with those players and they must be paused)

HeroUnit is an array of type unit, each index is the actual hero for each player.
 

bOb666777

Stand against the ugly world domination face!
Reaction score
117
Also youd have to make another trigger that runs when a player selects a unit and with a loop, if selected unit == DummyHero[Integer A], then Select HeroUnit[Integer A], so you can also select them through icons

+rep please :p
 

The Helper

Necromancy Power over 9000
Staff member
Reaction score
1,697
Need more help with this? Check out The Hive Workshop!


That is the absolute BEST resource for Warcraft 3 World Editor Help in 2023 and beyond. Everyone that was here is there.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top