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!
How can I make it so a Mage can cast a certain spell on a specific mechanical unit. For those of you familiar with WC2, Invisibility could be cast on Transports even though they were classified as mechanical.
Go to the Ability section in object editor, find your spell, find where it says "Targets Allowed" and then check the box that says Mechanical. That should work for most of the spells.
Event - Unit begins casting spell
condition - spell = invis
-OR-
unit type of unit of ability being cast is transport = false
unit calssification is organic = false
unit calsification is ect ect ect
" " " " " "
" " " " " "
action -
order casting unit to stop.
this will make it so that if you target anythingelse not listed in the conditions, it will cancel the spell before it is cast.
Yes, I know what you what. How does that not work then? make the spell so you can target anything, but make the spell cancel if you target something that does not fit into what ever critera you have. Instead of alerting the fields in the object editor you have to make a trigger with the appropriate alterations. You can use boolean conditions to get the unit type/classification. And unit-type coomparisons for what ever specific units you want targeted aswell.
Mark this transporting unit e.g. as "Tauren" in Object Editor. Remember: all other unit on your map CANNOT be marked as "Tauren" then.
Then, go to Ability Editor and in "Targets Allowed" check "Tauren".
Last point, go to Interface Editor, find string which appears when unit tries to cast spell on unit not being marked as "Tauren" and change it e.g. to "This spell can only be casted on Transporter".
It's dangerous when u start changing unit types and the like. sometimes the fields just arnt acurate. But if it works, then thats cool. I have just had experience in the past which causes errors even if u have all the fields set to what you want. the targeting system is a bit flakey.
oh im sorry, Noobystance. I hvae tried messing with the fields, and some of them overlap, and are just plain weird. I never got them to work how I wanted, so I had to restort to triggers. The trigger way just isn't as nice, because you don't get the default messages and error clicks, like when you try to target an invalid target.
You may want to add a text message after unit stop order, to let the player know why their spell was canceled.
I have another question about targeting system. I think that there is 3 types of ability targeting. Single targeting (Storm bolt), ground targeting (Flame strike) and no targeting (War stomp). It is possible to change a targeting type of an ability to another?
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.