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,701
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
  • Monovertex Monovertex:
    How are you all? :D
    +1
  • Ghan Ghan:
    Howdy
  • Ghan Ghan:
    Still lurking
    +3
  • The Helper The Helper:
    I am great and it is fantastic to see you my friend!
    +1
  • The Helper The Helper:
    If you are new to the site please check out the Recipe and Food Forum https://www.thehelper.net/forums/recipes-and-food.220/
  • Monovertex Monovertex:
    How come you're so into recipes lately? Never saw this much interest in this topic in the old days of TH.net
  • Monovertex Monovertex:
    Hmm, how do I change my signature?
  • tom_mai78101 tom_mai78101:
    Signatures can be edit in your account profile. As for the old stuffs, I'm thinking it's because Blizzard is now under Microsoft, and because of Microsoft Xbox going the way it is, it's dreadful.
  • The Helper The Helper:
    I am not big on the recipes I am just promoting them - I use the site as a practice place promoting stuff
    +2
  • Monovertex Monovertex:
    @tom_mai78101 I must be blind. If I go on my profile I don't see any area to edit the signature; If I go to account details (settings) I don't see any signature area either.
  • The Helper The Helper:
    You can get there if you click the bell icon (alerts) and choose preferences from the bottom, signature will be in the menu on the left there https://www.thehelper.net/account/preferences
  • The Helper The Helper:
    I think I need to split the Sci/Tech news forum into 2 one for Science and one for Tech but I am hating all the moving of posts I would have to do
  • The Helper The Helper:
    What is up Old Mountain Shadow?
  • The Helper The Helper:
    Happy Thursday!
    +1
  • Varine Varine:
    Crazy how much 3d printing has come in the last few years. Sad that it's not as easily modifiable though
  • Varine Varine:
    I bought an Ender 3 during the pandemic and tinkered with it all the time. Just bought a Sovol, not as easy. I'm trying to make it use a different nozzle because I have a fuck ton of Volcanos, and they use what is basically a modified volcano that is just a smidge longer, and almost every part on this thing needs to be redone to make it work
  • Varine Varine:
    Luckily I have a 3d printer for that, I guess. But it's ridiculous. The regular volcanos are 21mm, these Sovol versions are about 23.5mm
  • Varine Varine:
    So, 2.5mm longer. But the thing that measures the bed is about 1.5mm above the nozzle, so if I swap it with a volcano then I'm 1mm behind it. So cool, new bracket to swap that, but THEN the fan shroud to direct air at the part is ALSO going to be .5mm to low, and so I need to redo that, but by doing that it is a little bit off where it should be blowing and it's throwing it at the heating block instead of the part, and fuck man
  • Varine Varine:
    I didn't realize they designed this entire thing to NOT be modded. I would have just got a fucking Bambu if I knew that, the whole point was I could fuck with this. And no one else makes shit for Sovol so I have to go through them, and they have... interesting pricing models. So I have a new extruder altogether that I'm taking apart and going to just design a whole new one to use my nozzles. Dumb design.
  • Varine Varine:
    Can't just buy a new heatblock, you need to get a whole hotend - so block, heater cartridge, thermistor, heatbreak, and nozzle. And they put this fucking paste in there so I can't take the thermistor or cartridge out with any ease, that's 30 dollars. Or you can get the whole extrudor with the direct driver AND that heatblock for like 50, but you still can't get any of it to come apart
  • Varine Varine:
    Partsbuilt has individual parts I found but they're expensive. I think I can get bits swapped around and make this work with generic shit though
  • Ghan Ghan:
    Heard Houston got hit pretty bad by storms last night. Hope all is well with TH.

      The Helper Discord

      Staff online

      • Ghan
        Administrator - Servers are fun

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top