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

[Spell] React on unit morphs

Status
Not open for further replies.
Level 28
Joined
Feb 2, 2006
Messages
1,630
Hi,
at the moment I am trying to clear and store the a unit's inventory BEFORE it is morphed and to restore it AFTER it has been unmorphed.
I tried EVENT_UNIT_SPELL_CHANNEL and EVENT_UNIT_SPELL_ENDCAST but it is rather complicated to know when the unit is morphed.
Is there any better way to observe the unit's behaviour? For example using order id's or anything else. Does any library already exist like "MorphUtils" which covers those problems?
 
The spell effect event seems to work for me. What issues are you having exactly?

If you can't find a solution, then you can try making the transformation a dummy spell. You can remove the items, and then manually perform the transformation using this technique:
http://www.hiveworkshop.com/forums/general-mapping-tutorials-278/hero-passive-transformation-198482/

But it might not be ideal. I think you should be able to get the normal transformation working. Both spell effect and the issued order events seemed to run before the unit is actually transformed.
 
Status
Not open for further replies.
Top