• 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.

Display hero icons without giving control.

Status
Not open for further replies.
Level 3
Joined
Jul 7, 2009
Messages
43
Hello, i have tried using search, googling, everything, this forum is my last hope, can someone link me a tutorial on how to do this or possibly even tell me how? i want it so it displays all allied hero icons on the side so my healer can heal them without clicking on the hero, but the catch is i dont want people to have control of onanother =P
 
Level 7
Joined
Dec 26, 2006
Messages
303
meuh, that's kinda hard...

I haven't tried this but I could find a way to do this "theorically".
try using a dummy as representative of each hero, which mean 1 dummy for each 1 hero.

first of all, you've to use a trigger to make these 2 hero share their health (when the real heroes takes damage/being healed, reduce the dummy heroes's health in same amount and also do the opposite)
next, another trigger to when you choose the dummy, you're forced to select the real heroes... while the last problem I don't find a way to is for it's healing animation...

however I find this way un-efficient and a lot of work...

there's also other option where when a unit issued a healing spell as order to the dummy it's forced to change it's healing target to the real one.

hope, this help :xxd:
 
Level 3
Joined
Jul 7, 2009
Messages
43
and how exactly do i redirect the spell? or how can i make the dummy unit EXACTLY ontop of the hero? =D
 
Level 7
Joined
Dec 26, 2006
Messages
303
and how exactly do i redirect the spell? or how can i make the dummy unit EXACTLY ontop of the hero? =D
that's why I said it'll be hard :/

it can be done I'll give that... but with a lot of work :xxd:
I'm not that good in creating a flawless system so ask others advanced users in hive :p
 
Level 14
Joined
Aug 30, 2004
Messages
909
You might be able to use triggers to detect when the healer is given an order. Then order him to stop casting on the dummy target, and issue him the order to cast it on the real target. Something like this:

Event - a unit owned by Player is used an order with a unit target

Condition
- order equal to holylight (or whatever the heal spell is)
- unit-type of target unit of issued order = dummy unit-type

Action-

Unit - order (ordered unit) to stop
Unit - order (ordered unit) to holylight Hero[custom value of target unit of issued order]

You will need to detect which dummy unit it is and link it to the hero. The easy way to do that is make a unit arrays of size 12 called Hero. When you make a new hero also make a dummy unit and set the dummy unit's custom value to the hero's spot in the array.
 
Level 3
Joined
Jul 7, 2009
Messages
43
If anyone has the time or wants to just to be helpful, can you make me an example trigger for maybe 1 unit that i can replicate into all my other heroes? Im kinda confused on this whole thing
 
Level 7
Joined
Dec 26, 2006
Messages
303
first of all, I'll have to tell you that you don't need to have the dummy follow the hero all the time

example put this variables like this:
Hero - the hero unit which is owned by other player
DummyHero - the dummy hero which is owned by you (I recommend this hero to have 0 sight and you hide his icon from minimap)

you'll only need this to make them share the same health and mana:
  • Events
    • Time - Every 0.04 seconds of game time
  • Actions
    • Unit - Set life of DummyHero to (Life of Hero)
    • Unit - Set mana of DummyHero to (Mana of Hero)
one to cancel your selection:
  • Events
    • Player - Player 1 (Red) Selects a unit
  • Conditions
    • (Picked unit) Equal to DummyHero
  • Actions
    • Selection - Select Hero for Player 1 (Red)
and as darwin posted:
  • Events
    • Unit - A unit owned by Player 1 (Red) Is issued an order targeting an object
  • Conditions
    • (Target unit of issued order) Equal to DummyHero
  • Actions
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • (Issued order) Equal to (Order(holybolt))
      • Then - Actions
        • Unit - Order (Ordered unit) to Stop
        • Unit - Order (Ordered unit) to holybolt Hero
      • Else - Actions
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • (Issued order) Equal to (Order(healingwave))
      • Then - Actions
        • Unit - Order (Ordered unit) to Stop
        • Unit - Order (Ordered unit) to healingwave Hero
      • Else - Actions
*just taking a precause, you can look the spell's string at object editor
and also don't forget this:
  • Events
    • Map initialization
  • Actions
    • Hero - Disable experience gain for DummyHero
hope you understand it with this:wink:

please note that my version have lot of leaks... I'm just trying to explain it in easy way, how you improve those.. I leave it to your imagination :xxd:
sorry can't help you to the very end... I'm kind forgot how to remove trigger leaks since I left for years :xxd:
 
Level 3
Joined
Jul 7, 2009
Messages
43
Anyone that is sure of how to make this work? ive tried making my own system and when i update the dummy units health both of them die...and when i tell it to move where my unit moves the dummy unit autoruns back to base if i dont move...im surprised there are no tutorials...this seems like something that would be used alot.
 
Level 3
Joined
Jul 7, 2009
Messages
43
What does he mean by ally aspects? I tried going to ally properties and clicking Full share and Share, then unclicking share but that makes Full share unclicked and grayed out..


What trigger do i need to use? i dont see any that remove share units =(
 
Status
Not open for further replies.
Top