How to make a unit cast a custom ability?

Fatmankev

Chef, Writer, and Midnight Toker
Reaction score
240
Hey, I'm in the process of making an RPG based around the destruction of the Lich King. There will be a special unit in each dungeon that has unique abilities depending on which dungeon it's in.
This unit can't attack, but I want it to cast an ability similar to Charm every time it's attacked, only it will last for only a five second duration (making it difficult to kill solo due to a high health regeneration rate.) My current trigger is as follows:

Events
Unit - A unit is attacked.
Conditions
(Attacked unit) equal to Lich King's Frozen Reach 0027 <gen>
Actions
Unit - Order (Attacked unit) to Neutral Dark Ranger - Charm (Attacking unit)

Is there any simple (non-jass, plz, I'm retarded) way to make that unit cast the custom Charm spell I want it to cast? Thanks.
 
Q

Quadmxracer

Guest
Fatmankev said:
Hey, I'm in the process of making an RPG based around the destruction of the Lich King. There will be a special unit in each dungeon that has unique abilities depending on which dungeon it's in.
This unit can't attack, but I want it to cast an ability similar to Charm every time it's attacked, only it will last for only a five second duration (making it difficult to kill solo due to a high health regeneration rate.) My current trigger is as follows:

Events
Unit - A unit is attacked.
Conditions
(Attacked unit) equal to Lich King's Frozen Reach 0027 <gen>
Actions
Unit - Order (Attacked unit) to Neutral Dark Ranger - Charm (Attacking unit)

Is there any simple (non-jass, plz, I'm retarded) way to make that unit cast the custom Charm spell I want it to cast? Thanks.


If the lich king itself is not casting the spell you want, try using a dummy unit to do this.

Here is an example:

Mass Sleep
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Frost Nova
Actions
-------- First you create ur dummy unit --------
Unit - Create 1 Dummy caster for (Owner of (Triggering unit)) at (Position of (Casting unit)) facing 0.00 degrees
-------- Then you add your spell to the dummy unit --------
Unit - Add Frost Nova to (Last created unit)
-------- Then set level of your spell to the level of the spell on the caster --------
Unit - Set level of Frost Nova for (Last created unit) to (Level of Frost Nova for (Triggering unit))
-------- Finally order the unit to caste the spell --------
Unit - Order (Last created unit) to Undead Lich - Frost Nova (Target unit of ability being cast)
-------- Create a timer on the dummy unit so it well be removed after it's done casting its spell --------
Unit - Add a 1.50 second Generic expiration timer to (Last created unit)

If you have any questions please ask.

Here is a tutorial on custom spells, and dummy units if you need:
Spells - Basics of Trigger Enhancing Spells By: Daelin
http://www.thehelper.net/forums/showthread.php?t=28117
Dummy Casters By: Persen
http://www.thehelper.net/forums/showthread.php?t=26751

~Quadmxracer
 

martix

There is no spoon
Reaction score
49
You mean like - AI?
If so - think of situations that would be appropriate for casting this spell, then cast it :) Don't know what exactly this does, so...
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top