1. Updated Resource Submission Rules: All model & skin resource submissions must now include an in-game screenshot. This is to help speed up the moderation process and to show how the model and/or texture looks like from the in-game camera.
    Dismiss Notice
  2. DID YOU KNOW - That you can unlock new rank icons by posting on the forums or winning contests? Click here to customize your rank or read our User Rank Policy to see a list of ranks that you can unlock. Have you won a contest and still haven't received your rank award? Then please contact the administration.
    Dismiss Notice
  3. Ride into the sunset with the 32nd Modeling Contest. The contest is optionally paired. Best of luck, people!
    Dismiss Notice
  4. This adventure has come to an end. Congratulate our heroes in the 16th Mini Mapping Contest Results.
    Dismiss Notice
  5. From the gates of hell, the 5th Special Effect Contest Results have emerged.
    Dismiss Notice
  6. Race against the odds and Reforge, Don't Refund. The 14th Techtree Contest has begun!
    Dismiss Notice
  7. Check out the Staff job openings thread.
    Dismiss Notice
Dismiss Notice
60,000 passwords have been reset on July 8, 2019. If you cannot login, read this.

Show your teams stats, but make heroes unselectable.

Discussion in 'Triggers & Scripts' started by CloudWolf, May 10, 2009.

  1. CloudWolf

    CloudWolf

    Joined:
    Sep 30, 2008
    Messages:
    1,314
    Resources:
    56
    Models:
    3
    Icons:
    33
    Skins:
    16
    Maps:
    4
    Resources:
    56
    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:

    Show Image

    [​IMG]


    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?
     
  2. Teelo

    Teelo

    Joined:
    Mar 31, 2009
    Messages:
    709
    Resources:
    1
    Maps:
    1
    Resources:
    1
    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.

    Don't think so, because its out of space past 4.
     
  3. ap0calypse

    ap0calypse

    Joined:
    Jan 26, 2007
    Messages:
    4,777
    Resources:
    2
    Spells:
    1
    Tutorials:
    1
    Resources:
    2
    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.
     
  4. Teelo

    Teelo

    Joined:
    Mar 31, 2009
    Messages:
    709
    Resources:
    1
    Maps:
    1
    Resources:
    1
    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.
     
  5. ap0calypse

    ap0calypse

    Joined:
    Jan 26, 2007
    Messages:
    4,777
    Resources:
    2
    Spells:
    1
    Tutorials:
    1
    Resources:
    2
    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...
     
  6. graystuff111

    graystuff111

    Joined:
    Dec 11, 2007
    Messages:
    715
    Resources:
    23
    Icons:
    20
    Skins:
    1
    Maps:
    1
    Tutorials:
    1
    Resources:
    23
    Maby when the spell is begining to be cast on the dummy unit, the Hero is reoredered to cast the ability on the corospoinding hero.
     
  7. Lord_BoNes

    Lord_BoNes

    Joined:
    Sep 5, 2007
    Messages:
    264
    Resources:
    0
    Resources:
    0
    I believe that this is what you're after. :thumbs_up: