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

[General] How to disable spell after using morph spell?

Status
Not open for further replies.
Level 6
Joined
Jan 2, 2015
Messages
171
I have 4 spells ( 2 for original form and 2 for alternate form but this alternate spell comes from trigger and will disappear if i alternate my form but now its stays permanent after i use custom script MakeAbilityPermanent). My problem here is i tried to use Player - disabled spell for unit after finish effect of ability Robo Goblin but it just went disappear again even though i use custom script to make it permanent. Any idea how to disabled 2 original spell while in alternate form and will enable original spell when back to original form while disabling 2 alternate spell. Thanks!
 
Level 8
Joined
Jan 28, 2016
Messages
486
You could also use the Engineering Upgrade trick swap the abilities around. I don't have time at the moment to give you a specific solution but this might be worth a read for now.

Alright so this might be considered as a mini-necro but I wanted to get this all sorted once and for all. With a test map of course!! :D

It took me a while to get it right with the spell triggers, commands, etc. but it involves two partially customised Heroes that morph using 2 different methods; Method 1) The Demon Hunter uses a custom Metamorphosis to morph himself (instant cast) and Method 2) The Keeper uses a combination of a Channel-based ability (unit targeting) with the Bearform trick to morph himself or damage enemy units.

The documentation in the map and in-game should be self-explanatory but for clarification on the problems and solutions with both methods, check the spoiler below. Heads up, it's a bit of a read.

Method 1: Using a transformation ability
This is essentially covered in WereElf's thread but to sum it up:
  • Problem:
    When adding Engineering Upgrade to a transforming unit (Eg: Metamorphosis), abilities that are meant to be replaced are reset and the abilities in the Eng Upgrade data are removed. For instance, if Mana Burn was to become Fan of Knives when morphed, Mana Burn will be removed, set to 0 and reappear in the hero skill tab even when all points are spent; the Eng Upgrade (and hence Fan of Knives) will be removed as well.
  • Solution:
    As stated in the link above, setting Eng Upgrade as 'Permanent' with the Jass function UnitMakeAbilityPermanent() will prevent its removal when morphing.

Method 2: Using a unit-targeting ability and Bearform
In the second method, we're using the Bearform trick to morph a specific unit type (in this case, the caster) when targeted with an ability rather than a self-transformation.
  • Problem:
    When applying this method, the abilities of the alternate Hero (i.e.: the unit you want to transform into) are not added but the unit still morphs (has alternate unit's icon, model, armour, etc.). For example, the Keeper in the test map has Cluster Rockets as one of its initial spells. When the Bearform trick is performed, it should have Flame Strike in its alternate form; instead it still has Custer Rockets.
  • Solution:
    Adding/removing a custom Eng Upgrade with Cluster Rockets-into-Flame Strike will transform the spells back and forth.
  • The Catch:
    There is a critical side-affect to this solution however; the alternate spell retains the initial spell's targeting options (i.e.: Instant, Unit-targeting, Passive) and certain other effects. Therefore turning a passive into a point-targeting active won't work; it will still act as a passive even though the icon, tooltips, etc. are updated. The alternate ability needs to have the same targeting type for it to work properly at all. The only solution to this problem is to set the alternate ability to the Eng Upgrade itself (it won't appear in the command card as it will be disabled) and add the ability you want through triggers. This creates its own issue of the cooldowns of each spell acting independently, unlike when using Eng Upgrade. Unfortunately that's as good as it gets...
Well that's it. This probably won't fit perfectly for your Biomancer hero Kike but for you, and anyone else wondering, this should be a good demonstration of the limits and capabilities of using Engineering Upgrade and Bearform.

From this thread: Help with a Biomancer?
 
Level 6
Joined
Jan 2, 2015
Messages
171
You could also use the Engineering Upgrade trick swap the abilities around. I don't have time at the moment to give you a specific solution but this might be worth a read for now.



From this thread: Help with a Biomancer?

it was good idea but how to avoid the user from spamming the spell becuz my morph transformation does not have Timer and doesnt have cooldown to back to original form
 
Level 6
Joined
Jan 2, 2015
Messages
171
You could also use the Engineering Upgrade trick swap the abilities around. I don't have time at the moment to give you a specific solution but this might be worth a read for now.



From this thread: Help with a Biomancer?

Ur method works well now but the problem is my original spell and alternate spell have different casting time value and different cooldown. Imade the engineering spell to permanent. But i notice after u use robo goblin, it will inherit its cooldown and casting time. is there any solution to fix this? Just this two keep bothers me till now
 
Level 8
Joined
Jan 28, 2016
Messages
486
Bit of a necro here but what the hell. :p

it was good idea but how to avoid the user from spamming the spell becuz my morph transformation does not have Timer and doesnt have cooldown to back to original form

If you use Engineering Upgrade to change the spells, then the cooldown of the abilities will be intact and you won't be able to spam them unless they had no cooldown. If your adding and removing the abilities, then the cooldowns will be reset when you re-add the spells.

Ur method works well now but the problem is my original spell and alternate spell have different casting time value and different cooldown. Imade the engineering spell to permanent. But i notice after u use robo goblin, it will inherit its cooldown and casting time. is there any solution to fix this? Just this two keep bothers me till now

Don't think there's a fix for that. Not off the top of my head anyway. :(
 
Status
Not open for further replies.
Top