• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

How do I pick the unit after Metamorphosis?

Status
Not open for further replies.
Level 12
Joined
Jan 13, 2008
Messages
559
Hey, I would like to pick the unit, the caster got morphed into after using the ability. I tried the following already and it didnt work:

Unit-Enters Region --> the morph doesn't trigger this event

Unit-Finishes casting an ability
Ability = Morph
Pick every unit of typ (morph) owned by ...

Didnt't work either...
 
Level 21
Joined
Mar 27, 2012
Messages
3,232
Make them non-permanent first. Note that you can't usually add or remove hero abilities because their skill hero is a separate thing mechanically. You can add hero abilities, but they will not be represented at all in the skill menu.

About adding/removing hero abilities, I did discover one way and that is by using Dark Conversion. However, it also has a bug with the health, mana and armor given by hero attributes(not damage though, strangely).

native UnitMakeAbilityPermanent takes unit whichUnit, boolean permanent, integer abilityId returns boolean
 
Level 21
Joined
Mar 27, 2012
Messages
3,232
hm, I don't really get that. So it's not possible that my new uni has other abilities? or no ablities at all? (I could disable them but then I would enable them again when he morphes back and there is no event for this) :/

Why would it not be possible? Abilities defined in object editor apply properly with morphed units. It's just that you can't directly add hero abilities ingame, although you can add them with engineering upgrade, because EU only bugs when the ability has been leveled. Since hero abilities are not leveled at first, they technically don't exist on the unit.
 
Level 12
Joined
Jan 13, 2008
Messages
559
Okay so..how exactly is it possible? I am confsued. The morph ability is somehow very bugged. My alternate unit has damage lets say 10-10. My normal unit has no attack activated. So when I activate it..the morped unit has no attack still and it casts morph automatically again while its morphed already..:/ plus when I use the ability, it doesnt go on cooldown on the morped unit

/e: if I set it to permanent it works fine but the game crashes when the time runs out of the morphing :S
 
Last edited:
Level 21
Joined
Mar 27, 2012
Messages
3,232
If you want to morph between a hero and normal unit it's probably better to use some other ability. For instance, Dark Conversion crashes the game only when the hero icons get updated in the wrong order(so basically you can't create other heroes without turning one of the unit heroes into one).
 
Level 28
Joined
Feb 18, 2014
Messages
3,580
I agree with that ^ , but my current problem with morph ability is that it change the whole spells of the hero... E.x : I made a morph ability for Kalecgos to turn him into a bleu dragon, well the morph works perfect, but the abilities of the Dragon change, I want them to be like kalecgos current spells... the hero level doesn't change but only the spells...

Also sometime the game crash when I use this morph ability that's why I use triggers instead....
 
Level 21
Joined
Mar 27, 2012
Messages
3,232
If both forms have the exact same abilities then they should persist through morphs as well.
Although if they are in spellbooks you should make 2 identical spellbooks instead of one and make one use one of them and the other the other one. As strange as it is, it circumvents the bug with spellbook abilities disappearing.

If you've added the abilities through triggers, then use UnitMakeAbilityPermanent function on all that you've added and it should fix morphs.

If you replace units to morph them then there's little that I can do for you. Morphing heroes to non-heroes bugs so badly that it will break the game unless you morph back.

You can also cause morphs to apply without being cast by swapping the normal and alternate forms and then adding and removing the morph.
 
Level 28
Joined
Feb 18, 2014
Messages
3,580
Well, I'm quite not sure if the problem is in the OE of the map or the campaign? I check both of them that in the OE Campaign the two unit have the same abilities (Hero both, except the dragon I turn him into a hero) but then I realise in the OE of one my maps (inside the campaign) those two haven't the same abilities!?... I try to fix the OE Map but The spells doesn't change even in game...
What's seems to be the problem here? I fear to delete the map in order to make everything correct... and it's a long way...
 
Status
Not open for further replies.
Top