Hero Quickbar Icons for allied heroes

Zwiebelchen

You can change this now in User CP.
Reaction score
60
Okay, so you guys possibly know the trick how to add hero quickbar icons for allied-non-shared-control heroes by using Advanced unit control and disabling the ordinary unit control again.

However, as in my map all players have 3 heroes and not just one (hero and 2 bag heroes), I only want the "main" hero for every player to be accessable via the quickbar.

Is there a way to only have a quickbar icon for one hero per player and not all of them? The local player should still be able to access his bags by clicking on the quickbar - just not the bags of other players.

It doesn't matter wether the solution gets complicated ... I'm perfectly willing to create a huge script for just that purpose, if neccesary.
 

PurgeandFire

zxcvmkgdfg
Reaction score
509
Maybe you can make one global bag hero (or two) that is shared between the heroes. Then you can detect the selection and switch it to the real bag of that player. The only problem with it is that selection detection is very slow, especially in multiplayer, but you may be able to improve the speed by doing a periodic enumeration of selected units. (although that may lead to a slight performance loss)
 

Zwiebelchen

You can change this now in User CP.
Reaction score
60
I tried that when I was coding the bag system and it sucked balls for several reasons. Hmm.

I thought of 2 options now I could try out:
1) make the bags player 7,8,9,10,11,12 and share them to the players they belong to ... however this will ultimately lead to a lot of bugs and problems with buying/selling, etc.
2) Create invisible dummy heroes for every other player in the game and redirect spells targeting them to the player's heroes ... this is the way I am currently going for. I found out that locust units are still targetable via the quickbar icons, but you can not select them by clicking on the icon. This is actually something that I want. Lets see how it turns out.
 

Zwiebelchen

You can change this now in User CP.
Reaction score
60
I went for option 1). Easiest and most elegant way to deal with that issue, I think. And nobody plays this map with more than 6 players anyway.
option 2) did not work properly. While locust or hidden units could still be targeted via the quickbar, the spells did not cast, as an "unit is invulnerable" error occured and the spell event didnt fire.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top