• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[Trigger] Morph ability issue

Status
Not open for further replies.
Level 7
Joined
Jun 19, 2017
Messages
141
Hello, i'm making a trigger based Morf ability using the action Unit - Replace unit, everything seems to be ok but one thing. The problem is that everytime the Hero reverts back to his original form he has all his skills unlearned. So my question is:
How can i store that unit just before he uses his Morf ability, so i can refer to it when he morfs back to the original form. Please post a simplified solution if you come up with an idea.
 
@King Valdezar

First off: Do you want the morphed form to NOT have access to the hero abilities?

The default behavior is what the regular Demon Hunter does, which retains learned abilities in both forms.

Aside from that solution (obviously), you just hide the normal unit, store the original owner and change the owner of the normal unit to Neutral Victim (Player(14)). When casting the ability again, do the reverse.
 
Level 7
Joined
Jun 19, 2017
Messages
141
So let me put all the details i can think of:
First of all i wanted to use the Replace Unit Action because i found out that it let's you change the Primary Attribute and Stats of the Hero(something that regular morf abilities don't allow) and besides that it retains the level and exp of the old unit (if it's a hero) and passes it to the new one, which is very good.

So the hero is supposed to have 3 abilities that he levels (all of them being different shapeshifts based on channel and enchanced via Replace Unit Action).
All 3 Shapeshifted units have no HERO abilities but preset UNIT abilities which level is increased, depending on the level of Shapeshift casted.
All 3 Shapeshifted units have 1 Unit ability that is the same for all of them and it is to revert back to the original unit by again using the replace unit action.
So when you enter one form you have to exit that form through this ability in order to enter another form, do you get what im trying to achieve now ?
However, the Replace Unit action seems to nullify the level of abilities for the original hero when you revert back, resulting in your hero having 0 learned skills but the points are there for you to manually level them up.
 
Level 7
Joined
Jun 19, 2017
Messages
141
Ok got it. But can you show me in a basic trigger what is supposed to happen please?
i am also wondering if the original unit will inherit the level and xp of the morfed unit or i have to add it via trigger?
 
Level 25
Joined
May 11, 2007
Messages
4,651
Use the Night elf druid of the claw morph.
Check with triggers when it's used, Check the unit type, if normal hero, disable the hero abilities.

Enable them with a different trigger that checks if the unit type i a morphed hero.
The enable/disable ability is under Player I think.
 
Status
Not open for further replies.
Top