• 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.
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!
  • ✅ The POLL for Hive's Texturing Contest #34 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!
  • ✅ The POLL for Hive's Techtree Contest #20 is OPEN! Vote for the TOP 3 FACTIONS! 🔗Click here to cast your vote!

Ressurecting units and changing their owner

Status
Not open for further replies.

The_Legacy

T

The_Legacy

I want to make it so that when my Hero uses Ressurection the units Ressurected change ownership to the owner of casting unit.
I have tried and tried and have had no luck, suggestions would be appreciated.
 
Well I do not have a full proof method out of hand how to do it as I never have had to.

It probably involves detecting dead units as you cast the spell and checking if any of them change to alive (if it resurrects them and does not just make new units). If it does make new units that complicates things a lot as you then need to detect the new units as well by seing which units are most likly to be resurrected units.
 
still not working

  • Ressurection
  • Events
  • Unit - Unit Starts the Effect of an Ability
  • Conditions
  • (Ability Being Cast) Equal to Ressurection (Custom)
  • Actions
  • Unit Group - Pick Every Unit in (Units within 600.00 of (Target Point of ability Being Cast)) and do (Actions)
    • Loop - Actions
      • If ((Picked Unit) Equal to (Decaying Unit)) then do (Unit Group - Add (Picked Unit) to UnitGroup) else Do Nothing
  • Unit Group - Pick every unit in UnitGroup and do (Actions)
    • Loop - Actions
      • Unit - Change ownership of (Picked Unit) to (Owner of (Casting unit)) and Change Color
Is what i have so far (this still doesnt work) any help on how i can change this to make it work?
 
  • Ressurection
  • Events
  • Unit - Unit Starts the Effect of an Ability
  • Conditions
  • (Ability Being Cast) Equal to Ressurection (Custom)
  • Actions
  • Unit Group - Pick Every Unit in (Units within 600.00 of (Target Point of ability Being Cast)) and do (Actions)
    • Loop - Actions
      • If ((Picked Unit) Equal to (Decaying Unit)) then do (Unit Group - Add (Picked Unit) to UnitGroup) else Do Nothing
  • Unit Group - Pick every unit in UnitGroup and do (Actions)
    • Loop - Actions
      • Unit - Change ownership of (Picked Unit) to (Owner of (Casting unit)) and Change Color
Is what i have so far (this still doesnt work) any help on how i can change this to make it work?


Well, I told you before you could change the Units starts the effect of an abillity to "Unit starts casting an abillity". But meh, you said it didn't work so I can't help you. :/

By the way, HEYA CASEY!
 
Heya Michael
and yes i already tried that and it failed too...
i have tried many alterations on this trigger already, all have failed,
i think i need a new trigger, any help?
 
I tried using these two triggers, and it worked:
  • Ressurection change owner
    • Events
      • Unit - a unit Begins casting an ability
    • Conditions
      • (Ability being cast) equals to Resurrection
    • Actions
      • Set RessGroup = ( Units within 900 of (Position of Casting unit) matching ( Life of Matching unit Equals to 0) )
  • Ressurection cast
    • Events
      • Unit - a unit Starts the effects of an ability
    • Conditions
      • (Ability being cast) equals to Resurrection
    • Actions
      • Unit Group - Pick every unit in RessGroup
        • If ... then .... else
          • Conditions
            • (Picked unit is Alive) equals to true
          • Actions
            • Unit - Change ownership of (Picked unit) to (Owner of Casting unit)
It worked for me with the standard Paladin Resurrection.
 
Status
Not open for further replies.
Back
Top