• 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.
  • Create a faction for Warcraft 3 and enter Hive's 19th Techtree Contest: Co-Op Commanders! Click here to enter!
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 21st Texturing Contest: Upgrade is now concluded, time to vote for your favourite set of icons! Click here to vote!

Hero Buttons

Status
Not open for further replies.
Nah, just make the same unit-type for the player's allies and hide the unit:
  • Trigger0
  • Events
    • Map Initialization
  • Conditions
  • Actions
    • Hashtable - Create a hashtable
    • Set Hash = (Last created hashtable)
    • For each (IntegerA) from 1 to 12, do (Actions)
      • Loop - Actions
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • ((Player((Integer A))) controller) Equal to User
            • ((Player((Integer A))) slot status) Equal to Is playing
          • Then - Actions
            • Hashtable - Save 0 as (Key numberofheroes) of (Key (Player((Integer A)))) in Hash
          • Else - Actions
  • Trigger
  • Events
    • Unit - A unit finishes training a unit
  • Conditions
    • ((Trained unit) is a Hero) Equal to True
  • Actions
    • For each (IntegerA) from 1 to 12, do (Actions)
      • Loop - Actions
        • If (All conditions are true) then do (Actions) else do (Actions)
          • If - Conditions
            • (Player(IntegerA) is an ally of (Owner of (Triggering unit)) Equal to True
            • (Player(IntegerA)) Not Equal to (Owner of (Triggering unit))
          • Then - Actions
            • Set LoadInteger = (Load Key(numberofheroes) of (Key(Player(IntegerA))) from Hash
            • Hashtable - Save (LoadInteger + 1) as (Key numberofheroes) of (Key (Player((Integer A)))) in Hash
            • Custom script: set udg_Hero = CreateUnit (Player(GetForLoopIndexA()), GetUnitTypeId(GetTrainedUnit()), 0, 0, 0)
            • Unit - Hide Hero
            • Hashtable - Save Handle of Hero as (Key(heroes + (String(LoadInteger)))) of (Key(Player(IntegerA))) in Hash
 
Serbianbeast said:
Can I make heroes' buttons on the top left corner of the screen visible to other players?
Serbianbeast said:
I actually need them to represent the unit itself and redirect spells to them. I know how to do that what u suggested...

And I know that you must be more comprehensive, when phrasing out your issue.

Anyway, it's possible, I think Gaia's Retaliation does have a feature like this, but I feel very sleepy now to post such a code; it of course involves hashtables, which save the sold hero to the dummy hero (that is visible to your allies); you will then need a small "system", which will create a dummy unit and order it to embrace the order of your hero to the saved hero of the target unit of ability being cast. I had made some "Spell reflect" spell, which will show you the way to do the latter part I am telling you about. Notice though, it will only work for instant spells, e.g. Frost Nova/Chain Lightning/Slow/etc.

The map's here: http://www.hiveworkshop.com/forums/world-editor-help-zone-98/spell-reflection-169644/#post1611264
 
Status
Not open for further replies.
Top