HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Any way to disable unit morphing generally?

02-18-2007, 05:28 AM#1
CaptainPicard
Hello,

I have a JASS-enhanced spell that gets fouled up when a unit morphs. I've managed to get this under control by having a part of the function search for and detect any morphing abilities (that I know about) and remove them temporarily (the spell can only target non-heroes anyway). But, I was wondering if there was a more elegant and robust way to do this. Is there?

Thanks,

Capt. Picard
02-18-2007, 07:33 AM#2
blu_da_noob
Could you be more descriptive of what the spell does and how morphing affects it? Perhaps there is another solution.
02-18-2007, 09:22 AM#3
CommanderZ
Isn't it something with "Make ability permanent"?
02-18-2007, 05:36 PM#4
CaptainPicard
The ability that's added (by trigger) is a modification of the Item Life Regeneration ability (from Ring of Regeneration). It leaves no tile on the UI but it boosts the unit's life regeneration by 4 or 8 hp/sec (depending on which of the abilities I bestow by trigger). I use the presence of this ability to determine whether a unit has been affected by a certain spell that triggered the whole thing--and there is a simple but reasonable wait(360.0) to have the regeneration ability later removed and morphing restored.

Morphing ruins this--the morphed unit doesn't have the regeneration ability, and it's hard to determine when morphing actually occurs to transfer anything via triggers. (In any case, the unit would register as a different one in some cases, so it'd be a mess there too.)

So, what I currently do is take away morphing abilities when I bestow the regenerative ability (I may make fake icons that look like the disabled ability, and swap those for the true morphing ability). But, if there's a better way that'd be great!
02-18-2007, 05:58 PM#5
blu_da_noob
call UnitMakeAbilityPermanent(unit,true,ability id)