| 11-28-2003, 02:57 PM | #1 |
Question: How can i target with custom spell an unit with trigger without using JASS? restriction: i use UMS 3.8 and i must target only valid units. ex: bunny rabbit is valid units while footman isn't. but i cannot modify the "targeted as" or "unit classification" of the units i must do everything with trigger. example: i have a heal animal spell wich can target only animal but all my units has same classification and are all ground units, how can i tell the spell to stop casting or stop effect if the target isn't valid. units begin casting.... spell being cast = heal animal casting unit = ranger target= bamby set target =valid do spell effect target = footman set target unvalid don't do spell effect. How would i do this? please help...... |
| 11-28-2003, 03:37 PM | #2 |
If all your units are the same classification and all of them are ground units, why do you have to use triggers and not Targets Allowed / Targetted As ? If you really do need to use triggers, you'll have to make your spell a dummy ability, set up a system where all units are custom-valued to the index of their information in a unit array CastingTarget[], and make triggers like this: Order Catcher - runs on event a unit is issued an order, with condition string(issued order) is equal to (your dummy ability order). Records the Target of issued order in the CastingTarget array at the ordered unit's index. Spell Catcher - runs on event a unit starts the effects of an ability. Checks to see if the CastingTarget of the casting unit is a valid target. If it is valid, runs your spell - if not, doesn't. |
| 11-29-2003, 07:54 AM | #3 |
That's exactly what i was looking for, but i can barely understand all of it , i will try to do it and if i can't i will ask you again. thanks for your help. |
