• 🏆 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] Metamorphosis problem

Status
Not open for further replies.
Level 5
Joined
Feb 18, 2016
Messages
96
Hi
I am trying to add abilities through triggers to a Metamorphosis form of a hero but i cant understand why it is not working
  • Traspasar inv
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Metamorph
    • Actions
      • Set MetamorphUnit = (Casting unit)
      • Unit - Create 1 Dummy Unit 1 for (Owner of MetamorphUnit) at (Position of MetamorphUnit) facing Default building facing degrees
      • Set DummyCast = (Last created unit)
      • Unit - Order DummyCast to Human Sorceress - Invisibility MetamorphUnit
 
Level 13
Joined
Mar 24, 2013
Messages
1,105
I'm confused because you say you wish to add abilities to a unit and in your trigger you are casting invisibility on the unit.

What is not working?

The dummy isn't casting the spell? Does it have a mana cost? What happens when you try to order the dummy manually?

Be wary you're also leaking a point currently.
 
Level 11
Joined
Jul 25, 2014
Messages
490
You mean ordering a dummy to cast a spell on a metamorphed unit. Metamorphosis doesn't actually have to do anything with your problem.

A couple of things:
1. Casting unit -> Triggering unit (slightly more efficient, sorry for being nitpicky);
2. Store your point into a variable so you can clean it with a custom script afterwards (@pOke already stated this);
3. Now to your actual problem. There's a number of things that could be an issue. Your dummy must have enough mana to cast the spell, the spell must not be on cooldown, your dummy should have 0 cast point and 0 backswing as well as have locust (is not the problem, but still), your unit needs to be available as a target for the ability, the list goes on, you should just check how to make a proper dummy. Also, remove your dummy once you're done with it.
 
Level 5
Joined
Feb 18, 2016
Messages
96
I'm sorry for not speaking clearly. The issue is "I can't detect the metamorphosis alternative unit" I tried also with add "ghost" and remove it later to the variable but it seems it does recognize the variable when metamorphosis starts
 
Level 8
Joined
Jan 28, 2016
Messages
486
Try changing the event to Unit - A unit Finishes casting an ability instead. That way when you store the unit in the variable, it should be able to keep track of it and allow your dummy to cast Invisibility on it.
 
Status
Not open for further replies.
Top