• 🏆 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!

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