• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Activate Spell Event

Status
Not open for further replies.
Level 8
Joined
Oct 8, 2005
Messages
409
I'm making a spell...called "Camouflage", which causes slow movement and invisibility on caster

The base spell for "Camouflage" is the "Magic Defense" human unit spell, which causes spell immunity and slow movement as long as it is activated and ends when deactivated

Trigger-

Event: Generic Unit casts a spell

Condition: "Casting Ability" is Equal to "Camouflage"

Action: Summon Dummy Unit
Order "Dummy unit" to cast "invisibility" on "casting unit"

-End Of Trigger

My trigger is not happening, I think it is because the spell I am using can be Activated and Deactivated

What event should I use that will detect when a spell is Activated instead of caste ?

Or do you see different problem with my spell ?
 
Level 24
Joined
Jun 26, 2006
Messages
3,406
You can base that off of Wind Walk, shift+click the field for movement speed and you can use negative values (with [highlight]-[/code]) without it whining at you. No triggers necessary.

A problem that I can see with your trigger is that it doesn't seem to summon the dummy unit anywhere. If you want to do it that way still, maybe preplace the dummy unit and then just order it to cast invisibility. You may also want to use "Last created unit" instead of directly choosing the dummy unit.
 
Level 3
Joined
May 4, 2007
Messages
66
Problem with trigger is that Magic Defend (and Defend) ability doesn't trigger that event.
Ure trigger should look like this:
  • Some Trigger
    • Events
      • Unit - A unit Is issued an order with no target
    • Conditions
      • (String((Issued order))) Equal to magicdefense
    • Actions
In condition u should put order of the ability (Text - Order String in ability in object editor).

But still the way Teh_Ephy suggested is much better than this.
 
Level 4
Joined
Dec 30, 2006
Messages
84
The problem in your trigger is that Dummy unit casts invisibility on herself... because you give her order to cast Spell on "casting unit"; since the dummy is the caster... u know what happens..

Try using this:
event:
generic unit event- starts an effect of an ability
condition:
ability being cast is equal to <Your Spell>
Action:
Create dummy at blabla :grin:
...
order Last created unit to Human Sorceress-Invisibility on triggering unit
...
...

That should Work if you must haveit done with Triggers^^ :D
 
Status
Not open for further replies.
Top