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

[Trigger] Replace (Unit) With Inventory

Status
Not open for further replies.
Level 2
Joined
May 24, 2008
Messages
24
Well, the ability is actually a custom Possession. The only different thing is that I want the Target Unit to have a ability that can replace, again, with the Possession casting unit. And, since it's not a Hero, but it have a inventory, I tried this:

  • Body Swap
    • Events
      • Unit - A unit Finishes casting an ability
    • Conditions
      • (Ability being cast) Equal to Body Swap
    • Actions
      • Unit - Add Leave Body to (Target unit of ability being cast)
      • Unit - Set level of Leave Body for (Target unit of ability being cast) to 1
      • For each (Integer A) from 1 to 4, do (Actions)
        • Loop - Actions
          • Set LeaveBodyItem[(Integer A)] = (Item carried by Amani Shadow Councilor 0051 <gen> in slot (Integer A))
And then, the LeaveBody, that the targeted unit of "Possession" will have to learn.

  • Leave Body
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to Leave Body
    • Actions
      • Unit - Replace (Casting unit) with a Amani Shadow Councilor using The old unit's life and mana
      • For each (Integer A) from 1 to 4, do (Actions)
        • Loop - Actions
          • Hero - Give LeaveBodyItem[(Integer A)] to (Casting unit)
But, it doesn't work, at all. Mainly the item part.

Anyone can help at this?
 
Level 2
Joined
May 24, 2008
Messages
24
Well, it will probably work. Thanks a lot.

But, I can't use it since the Add Ability does not work.
 
Status
Not open for further replies.
Top