| 06-23-2008, 07:25 PM | #2 |
The event response "target unit of ability being cast" does not work with those events as far as I know. Also, the "stops casting" event occurs no matter if the unit finished casting the spell normally or stopped prematurely. There's no need for the "finishes casting" event to be there. |
| 06-23-2008, 07:59 PM | #3 |
If you don't need the spell to be MUI, just create a global unit variable and assign (Target Unit) to it on (Event - Starts Effect of Spell) in a separate trigger. If only for 1 unit per player can cast the spell, you can create a global unit array instead. ________________________________________________ Never, NEVER, use waits inside For Loops. A For Loop uses a global variable for the looping, so things are pretty big this AND something else in your map will screw up badly. |
| 06-23-2008, 08:41 PM | #4 |
So is there an event response that works with them? And if they serve the same purpose, why are there 2? Besides, if he is stopped (with an order) the trigger plays out; but if he finishes (the full ability duration), it doesn't. So it seems that they are different somehow. EDIT: Oops, didn't see your post, Themerion. Well, sorry about the Waits; it's actually the same trigger as in the other topic you were helping out in :P. But it does need to be MUI/MPI; it's my entry for the spell contest. |
| 06-23-2008, 08:47 PM | #5 | ||
Quote:
Quote:
|
| 06-23-2008, 08:54 PM | #6 |
Well, yes, I know. That's what I'm saying. Hence the rhetorical "why would there be 2 if they are the same" question. My problem is, neither [Stops] or [Finishes] seem to work when the unit completes the set duration of the spell in question. EDIT: Well great. I implemented all your coding, Themerion. Now it doesn't work right at all. When the target unit died, the spell ended; my code removed all the sfx and dummy units and everything at that point. Now, however, they aren't removed!... It's like adding new lines of code makes it ignore what happened before (which I know shouldn't happen, since a trigger goes through things linearly). Thoughts? |
| 06-23-2008, 09:03 PM | #7 | ||
Quote:
Quote:
You need to work with Begins Effect of Spell, otherwise you cannot get the targeted unit. If your ability leave a buff, you can wait for the buff to disappear, then do your stuff. This is the sort of stuff which you normally use JASS for. But, hey, did the contest really specify that the spells had to be 100% MUI? EDIT Debug your code. Use (Game - Game Message) in order to see if your trigger has somehow cancelled at some point. |
| 06-24-2008, 07:20 AM | #9 |
Don't use both events. Only use stops casting. |
| 06-24-2008, 01:13 PM | #10 |
Ok. Well, thanks for all the help, you two; I'm going to submit now, so my fingers are crossed. |
