• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Show your teams stats, but make heroes unselectable.

Status
Not open for further replies.
Level 30
Joined
Sep 30, 2008
Messages
1,460
Basically, im trying to make some sort of system that shows your teams stats down the side of the screen.

To do this I have given players advanced shared control of eachother so the hero icons appear down the side as shown below:


team.jpg



I thought about dummy units, but i also want the players to be able to cast spells on eachother using these icons.

While this works, it also gives players control of eachother which is a big no :p

I tried making a GUI trigger which deselects the allied hero when selected, however, theres always a split second delay. If a player is quick, this means he can issue a command.

My question is:
Is there a way to auto-deselect the hero, but with no delay?

or possibly prevent a player from selecting allied heroes all together? (granted they still need to be selectable for spell casting)


EDIT: Also, by default war3 only allows 4 shared heroes down the side, is there a way to increase that number?
 
Level 11
Joined
Mar 31, 2009
Messages
732
Hmm, tough one.

My first thought was to use a multiboard, then I realised you said you want the heroes cast on from that interface. Maybe its possible to add hero icons to the multiboard? Stranger things have happened, I've seen someone making an equipment manager with a multiboard :|

A quick search didn't show any functions for disabling selection ability for a specific unit, but if there is one you could do a GetLocalPlayer() loop and disable functionality for those players who don't own the hero.

Otherwise you could still use the dummy unit, and go through the painful task of setting up all abilities to redirect their targets to the main heroes when cast on.

However, I'm sure theres a simple solution that a pro coder will reply with.

EDIT: Also, by default war3 only allows 4 shared heroes down the side, is there a way to increase that number?
Don't think so, because its out of space past 4.
 
Level 28
Joined
Jan 26, 2007
Messages
4,789
First of all: really nice thread, this is clearly something else than "help me plss".

Well, it's not the option you search for, but it might be a solution:

Create a hero-dummy with a few active, instant abilities (e.g.: Wind walk).
Rename the abilities to "Show blue's Stats" / Teal's stats / ...

When one of the abilities is activated, the dummy's stats/experience/items/spells/location/... will change to the hero of the player matching the ability.
So if you would activate "Show Blue's stats", the dummy hero will copy all the stats of the hero blue has.
That way you can easily check his stats, spells and items without controlling the hero itself.

Edit:
I'm sure you're a good coder, so you will be able to figure out how to do it (and you can still cast with the dummy units, of course).

If this wasn't what you were looking for, then I'm afraid I can't help you.
 
Level 28
Joined
Jan 26, 2007
Messages
4,789
Hmm he wants to be able to cast spells on those heroes. Like having a death knight, and an ally has a pit lord, he wants to be able to coil it via the UI, without being able to control the pit lord.

I know, dummies can also cast spells.
The dummy will copy his spells (as said in my post) and (I've just edited it, I forgot to mention he will move to the location), he can target everyone the actual hero should be able to target.

With triggers, you can link those 2 units, but it isn't easy...
 
Status
Not open for further replies.
Top