How to give and instantly cast spells to heroes after casting another spell?

Status
Not open for further replies.
Level 3
Joined
Oct 22, 2022
Messages
13
Hello, I'm actually new to modding (if you can call my low effort stuff that...) and I just wanna know if there's a way for a unit to cast a spell by using another spell.

in case you're confused by what I meant, I'll give u my scenario.

I want my Hero to immediately cast Metamorphosis (Do note that metamorphosis is not in his skill set) after using my custom AoE spell. Is that possible???

Just to show you how incompetent I am in terms to making triggers:
 

Attachments

  • 2022-10-22.png
    2022-10-22.png
    105.4 KB · Views: 18
Level 41
Joined
Feb 27, 2007
Messages
5,229
Units, by default, cannot cast a spell or ‘recover’ from casting a spell instantaneously. Units have to turn to face the direction in which the spell is being cast as well as play their cast backswing animation and cast follow-through animation. This means that you can’t order a unit to cast a spell in a trigger that runs on-spellcast; the second order never goes through because the unit is still finishing the cast of the first.

Dummy casters can get around this limitation and effectively cast instantaneously anywhere on the map if they are properly configured. This configuration means having all cast-related animation points set to 0 and having 0 move speed and the movement type None. Such a caster does not need to face its target. This could be done to a non-dummy unit if you don’t need it to turn to attack/cast and you don’t care that it doesn’t play any animations when casting spells. Not ideal.

You may be screaming that neither of the spells you need to cast have targets… but that doesn’t really change anything here. The big problem is going to be that metamorphosis must be cast by the unit that is to transform, so it can’t be dummy cast. To come to a proper solution we need to know more about the specifics:
  • Is the AoE ability targeted or not? Being targeted is an additional complication.
  • Are you trying to delay the metamorphosis to occur after the aoe effect happens, or if it happened first is that okay?
  • Does the unit transform after using the aoe every time, or only under certain conditions?
  • Is it possible that the transforming unit becomes stunned or silenced while using the AoE effect, so it wouldn’t be able to transform afterward? If that occurs, is that the way it should work, or should the unit be able to transform regardless?
  • Could you get away with a method like this being timed or do you need the metamorphosis timer bar? Hero passive transformation
 
Last edited:
Status
Not open for further replies.
Top