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

Polymorph Trigger

Status
Not open for further replies.
Level 10
Joined
Nov 5, 2008
Messages
536
I have a unit that casts Polymorph on friendly units. It does not turn them into sheeps but instead into a better unit. But when units are polymorphed they only gain the new model and the speed of the model. They can't attack or cast abilities.
Is it possible to make the polymorphed unit be replaced by a permanent new unit?
 
Level 11
Joined
Feb 16, 2009
Messages
760
Sure. I recommend you to use a dummy ability based of Holy light. Make it a unit ability, with mana and cooldown. but without effect and make sure you can only target friends.
Then make this trigger:
  • Polymorph
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Your Dummy ability
    • Actions
      • Unit - Create 1 Your unit for (Owner of (Triggering unit)) at (Position of (Target unit of ability being cast)) facing Default building facing degrees
      • Unit - Remove (Target unit of ability being cast) from the game
 
Level 12
Joined
Aug 22, 2008
Messages
911
  • Polymorph
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Your Dummy ability
    • Actions
      • Set point = (Target of Ability being cast)
      • Unit - Set vislibility of (Effected Unit or something) to 0% (or something)
      • Unit - Pause (Effected Unit or something)
      • Unit - Create 1 Your unit for (Owner of (Triggering unit)) at point facing Default building facing degrees
      • Unit - Set mana and life to effected unit's
      • Custom script: call RemoveLocation(udg_point)
      • Wait (Duration of Polymorph buff) seconds
      • Unit - Set visibility of effected unit (if that still works) to 100%
      • Unit - Set mana and life of effected unit to those of (last created unit)
      • Set point = position of (last created unit)
      • Unit - Move effected unit (instantly) to (point))
      • Custom script: call RemoveLocation(udg_point)
      • Unit - remove (last created unit) from the game
Not exactly flawless (more like bugging like hell) but you got my point. MUI and leakless.
 
Level 2
Joined
Feb 28, 2009
Messages
11
You dont need triggers at all. Go to abillity editor in object editor then go down til you see the data section and change the units that polymorph makes (you need to change it for air units and water units ect. too) then go down abit more til you see the stats section and set the duration for units to 0 (0 makes it permanent). If you want it to affect other units such as machines then go down more to the targets allowed and uncheck the organic units and if you want to affect heros for a wierd reason then uncheck non-hero. thats it i think. :thumbs_up:
 
Status
Not open for further replies.
Top