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

Replace Unit while keeping abilities

Status
Not open for further replies.
Level 11
Joined
Feb 23, 2009
Messages
577
Is it doable in an easy manner? Or do I have to trigger every ability like this (below)?

  • Untitled Trigger 001
    • Events
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Level of Ability_A for Unit_A) Greater than or equal to 1
        • Then - Actions
          • Unit - Add Ability_A to (Last replaced unit)
        • Else - Actions
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
If you want other way than this, you could resort to Hero Passive Transformation method.

Here's a test map.

Using ReplaceUnit function along with UnitMakeAbilityPermanent(whichUnit, true, whichSpellId) will not work.
 

Attachments

  • Hero Passive Transformation Keeping Abilities.w3x
    16.7 KB · Views: 52
Level 11
Joined
Feb 23, 2009
Messages
577
  • Melee Initialization
    • Events
      • Map initialization
    • Conditions
    • Actions
      • -------- The Blood Mage has: --------
      • -------- Level 1 Siphon Mana --------
      • -------- Level 2 Banish --------
      • -------- Level 3 Flame Strike --------
      • -------- ----------- --------
      • Set u = Blood Mage 0000 <gen>
      • -------- ----------- --------
      • -------- This function will make the ability stays on that unit even after morph --------
      • Custom script: call UnitMakeAbilityPermanent(udg_u, true, 'AHfs')
      • Custom script: call UnitMakeAbilityPermanent(udg_u, true, 'AHbn')
      • Custom script: call UnitMakeAbilityPermanent(udg_u, true, 'AHdr')
      • -------- ----------- --------
      • -------- This is Hero Passive Transformation method --------
      • Unit - Add Blood Mage -> Paladin to u
So u have to have the unit use the spell and then not have a return to normal form ability?


PS: Yeah that doesn't help it would require so many extra custom spells
 
Status
Not open for further replies.
Top