• 🏆 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!

Metamorphosis and Bear Form Remove Abilities

Status
Not open for further replies.
Level 1
Joined
Jan 23, 2015
Messages
160
I'm making an ability based off of Bear Form just so my character can transform but the alternate form doesnt keep it's abilities :\

Same for metamorphosis. How can I make an ability that functions this way (change into a different unit) but lets the alternate form keep unit abilities I've assigned to it within the object editor.
 
Level 1
Joined
Jan 23, 2015
Messages
160
Already did that from the start which is how I ran into the problem. The ability simply removes unit abilities from the alternate unit
 
Level 9
Joined
Apr 23, 2011
Messages
527
if the morph removes the abilities even if the alternate form has them, try making a trigger that checks if the morph ability has started its effect, then add the desired abilities and set their level.
 
Level 1
Joined
Jan 23, 2015
Messages
160
I was afraid it would come down to triggers haha, not too surprising I suppose.

Would you be able to show me how I'd set that up?
 
Level 18
Joined
May 11, 2012
Messages
2,103
Set the abilitirs that you want to give him to variables.
Then when your unit transforms, give him those abilities and then write script under it:
call UnitMakeAbilityPermanent(udg_yourVariablename of transforming unit, true, udg_variableName for the ability you're giving it)
 
Level 1
Joined
Jan 23, 2015
Messages
160
Set the abilitirs that you want to give him to variables.
Then when your unit transforms, give him those abilities and then write script under it:
call UnitMakeAbilityPermanent(udg_yourVariablename of transforming unit, true, udg_variableName for the ability you're giving it)

I gave this a try, it still had no result. Did you try this on a map?
 
Level 1
Joined
Jan 23, 2015
Messages
160
Beartrig.jpg


Sorry, where as they say "casting unit" they were actually assigned to specific units, a druid and his bear for, just to make it easy.
 
Level 9
Joined
Apr 23, 2011
Messages
527
Beartrig.jpg


Sorry, where as they say "casting unit" they were actually assigned to specific units, a druid and his bear for, just to make it easy.

are the druid form and bear form of the unit both in the map?

also
try using the "A unit starts the effect of an ability" event with the condition "(Ability being cast) equal to *ability*"

btw you can right click on the name of the trigger above the Events tab, then click Copy as Text, paste it here then wrap it around with trigger tags, which is a simpler process.
 
Level 18
Joined
May 11, 2012
Messages
2,103
Wrap your triggers around tags.

This is how your trigger should look
  • Melee Initialization
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Your Ability
    • Actions
      • Set JumpAbility = YourAbility
      • Set TrigUnit = (Triggering unit)
      • Unit - Add JumpAbility to TrigUnit
      • Custom script: call UnitMakeAbilityPermanent(udg_TrigUnit, true, udg_JumpAbility)
      • Custom script: set udg_JumpAbility = null
      • Custom script: set udg_TrigUnit = null
You add that ability to him when your hero/unit casts that spell, not when the map loads because there is simply no "Casting Unit" in Map Initialization event, thus "Casting Unit" returns null.
 
Level 1
Joined
Jan 23, 2015
Messages
160
  • Super Form
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Bear Form
    • Actions
      • Set JumpAbility = Jump
      • Set Trigunit = (Casting unit)
      • Unit - Add JumpAbility to Trigunit
      • Custom script: call UnitMakeAbilityPermanent(udg_Trigunit, true, udg_JumpAbility)
      • Custom script: set udg_Trigunit = null
      • Custom script: set udg_JumpAbility = null
The last custom script kept producing an error saying it expected a name. I had to remove it to start map.

And it didn't work. I think there is just a horrible curse about the ability morph that removes unit abilities.
 
Status
Not open for further replies.
Top