HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Trigger When Spell Used

01-08-2003, 03:43 PM#1
Guest
Is there any trigger event that will trigger when a specific spell is used? There is one for an item used but nothing for spells.

Please Help.
01-08-2003, 05:37 PM#2
Kerry
Yes it is, use this one:

Event - Specific unit event/Player owned unit event

Unit is issued an order targeting a object/point/no target (depending on the spell)

Condition - Issued order equal to [your spell here]

There ya go!
01-08-2003, 05:59 PM#3
Guest
Now...Will this work on a custom spell that I made? (not just editing another spell) I'm sorry, I'm at work so I can't try it.


break.
01-08-2003, 06:14 PM#4
rwxr-xr-x
Quote:
Originally posted by breakscience
Now...Will this work on a custom spell that I made? (not just editing another spell) I'm sorry, I'm at work so I can't try it.


break.


It depends. If all you did is edit a spell, then you can reference it even in the normal world editor. Then when you import your AbilityData.slk and other related files into your map, the spell will function as expected.

If you created a new spell, you will need to create a Units\ directory in your main Warcraft III directory and place all of those files in it so that the editor can reference the new spell.
01-08-2003, 07:06 PM#5
Guest
Thanks guys. I'll try when I get home.
01-08-2003, 10:04 PM#6
MicrosoftXP
its a little more complicated than that actually because you have to check if the order was issued within the spells range and if the unit is issued another order (which would cancel the spell) before the caster is in range of casting it. I think i needed 3 triggers to do this.
01-10-2003, 12:41 PM#7
Guest
Quote:
Originally posted by rwxr-xr-x
It depends. If all you did is edit a spell, then you can reference it even in the normal world editor. Then when you import your AbilityData.slk and other related files into your map, the spell will function as expected.

If you created a new spell, you will need to create a Units\ directory in your main Warcraft III directory and place all of those files in it so that the editor can reference the new spell.



Okay, still doesn't show up. It looks as though the only spells it has as presets are (mostly) hero spells. I was trying to use a custom creep spell. I tried to type the spell name as the value, but it didn't work. Please help.
01-10-2003, 04:57 PM#8
Guest
It seems that this list of preset spells is hard coded somewhere. Is there any way to add one of my new (not just edited) custom spells?


Thank you.
01-10-2003, 05:46 PM#9
BoddoZerg
When you make a custom spell, the "Unit is given Order" event will detect the casting of the spell it is based on.

So for example, if you make a spell based on Blizzard, you must use the event:

Unit is Given Order
(Given Order) is equal to (Human Archmage - Blizzard)

This is true *EVEN IF* your spell uses a different Uberalias. The actual Order that is detected by the trigger is based on the Code section of AbilityData.slk, not Alias or Uberalias. Setting a different Order in RaceAbilityFunc.txt DOES NOT DO ANYTHING, so don't even try.

This isn't as bad as you'd think, because a single unit can only have one spell of the same Code, so you can always detect every spell like this:

Event - Unit is given Order
Conditions - Given Order equal to (Code)
Unit-Type of (Ordered Unit) equal to (Unit)

You can see how it is possible to detect all instances of custom spell casting by downloading and viewing the triggers in Warcraft 2.3 (It's unprotected):
http://www.geocities.com/boddozerg/
01-10-2003, 05:55 PM#10
Guest
I'll check that out later.

Thanks dude.