Making a unit perform a spell

neckcuttabob

Member
Reaction score
3
How do you make a unit use a spell with a trigger, I know you can make them use most of the spells in the game already but I have my own spell I need it to do. The built in trigger for casting spells looks like this.

Unit - Order (Picked unit) to Night Elf Demon Hunter - Metamorphosis

I tried using a custom script wrote up like that but it doesn't work.
Any ideas?
 

the_ideal

user title
Reaction score
61
That should work, just make sure
1) you are using the "Pick every unit" function so that there actually is a picked unit for your action to cast the spell for.
2) the unit has metamorphosis or a spell based off of it
3) the unit has the required mana
4) you have an event that makes sense and that will run

Why don't you right click the name of your trigger, click "copy as text" and paste it here so I can see it?
 

adeoin

Member
Reaction score
11
like this
JASS:
Event-  *X* seconds Of Game Time
Condition-NONE
Action-
Unit-Add Ability Metamorphisis
Unit-Order *Your Unit* To Cast Metamorphisis
The words in stars are the adjustable and changeble ones.
Sorry this is hand written.
There are three different kinds of order unit commands in the trigger editor

1.target a unit(Ex. Storm Bolt/Acid Bomb etc)
2.target a point(Ex. Shockwave/Cluster Rocket etc)
3.no target(Ex. War Stomp/ Metamorphisis/ Thunder Clap etc)


Make shure u use the correct one

I hope this helped you ^^
 
General chit-chat
Help Users

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top