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

[Solved] Changing ownership of a unit via an Ability.

Status
Not open for further replies.
Level 2
Joined
Sep 20, 2010
Messages
10
So far this trigger works -

  • Beast Taming
    • Events
      • Unit - A unit owned by Player 7 (Green) Is attacked
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Unit-type of (Triggering unit)) Equal to Baby Stag) and (((Triggering unit) has buff Ensnare (Ground)) Equal to True)
        • Then - Actions
          • Unit - Change ownership of (Triggering unit) to Player 1 (Red) and Change color
        • Else - Actions
But i want it so that when a player that owns Unit-Type(x) casts an ability to ((Unit-type of (Triggering unit)) Equal to Baby Stag) and (((Triggering unit) has buff Ensnare (Ground)) Equal to True) change ownership of player who casted the ability.



Thanks. :)
 
Last edited:
Level 16
Joined
Mar 27, 2011
Messages
1,349
I think this should work:

  • Baby Stag
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Baby Stag
      • ((Target unit of ability being cast) has buff Ensnare (General)) Equal to True
    • Actions
      • Unit - Change ownership of (Target unit of ability being cast) to (Owner of (Triggering unit)) and Change color
Edit: Fixed "Animate Dead" to "Baby Stag" under conditions.
 
Level 2
Joined
Sep 20, 2010
Messages
10
Okay so i have a Unit - Hunter which has an ability - Beast Tame and when he casts it to a Unit - Baby Stag, i want it so that Unit - Baby Stag will change ownership to whoever controls Unit - Hunter.

I hope that narrows it down.

I think this should work:

  • Baby Stag
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Baby Stag
      • ((Target unit of ability being cast) has buff Ensnare (General)) Equal to True
    • Actions
      • Unit - Change ownership of (Target unit of ability being cast) to (Owner of (Triggering unit)) and Change color
Edit: Fixed "Animate Dead" to "Baby Stag" under conditions.

Sorry, But nothing happened :l And baby stag is a unit, not an ability
 
Last edited by a moderator:
Level 33
Joined
Mar 27, 2008
Messages
8,035
Try this;
  • Melee Initialization
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Tame Baby Stag
      • (Unit-type of (Target unit of ability being cast)) Equal to Baby Stag
      • ((Target unit of ability being cast) has buff Ensnare (Ground)) Equal to True
    • Actions
      • Unit - Change ownership of (Target unit of ability being cast) to (Triggering player) and Change color
 
Level 2
Joined
Sep 20, 2010
Messages
10
Try this;
  • Melee Initialization
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Tame Baby Stag
      • (Unit-type of (Target unit of ability being cast)) Equal to Baby Stag
      • ((Target unit of ability being cast) has buff Ensnare (Ground)) Equal to True
    • Actions
      • Unit - Change ownership of (Target unit of ability being cast) to (Triggering player) and Change color

I have no idea but this trigger dosnt work.. Did you test it?? If so, did it work?? Because for me it isn't working.. And
Here this worked for me:

It must already be ensnared

It must be a Baby Stag

Edit: I was writing this up when Defskull posted his :/
Your concept works but can you condense it to just one ability instead of two?? :) It will be much better :) Thanks guys
 
Level 37
Joined
Mar 6, 2006
Messages
9,243
I have no idea but this trigger dosnt work.. Did you test it?? If so, did it work?? Because for me it isn't working.. And Your concept works but can you condense it to just one ability instead of two?? :) It will be much better :) Thanks guys

The trigger won't work if it is the Tame Stag ability that gives the Ensnare buff. The unit won't have the buff in this stage yet, and the condition fails. You can remove the buff condition.
 
Status
Not open for further replies.
Top