• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Ressurecting units and changing their owner

Status
Not open for further replies.

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,199
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.
 
Level 2
Joined
Jul 21, 2007
Messages
8
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?
 
Level 2
Joined
Jul 5, 2008
Messages
6
  • 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!
 
Level 12
Joined
Apr 15, 2008
Messages
1,063
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.
Top