| 07-15-2007, 06:54 PM | #2 |
And what is your problem? That action called "Skip remaining actions" really skips the rest of the trigger? |
| 07-15-2007, 06:55 PM | #3 |
My problem is that if I replace the Do Nothing w/ Skip Remaining Actions, the damage and stuff never occurs, even if the unit has the buff... |
| 07-15-2007, 07:04 PM | #4 |
I think you may want to start over and could do it without a loop. What does this spell do exactly? Stuns and damages the target every second until the target reaches a certain low amount of HP? And I assume the spell itself is only a stun so you are adding the damage over time component with a trigger? EDIT dunno what i was thinking... you would need a loop |
| 07-15-2007, 07:06 PM | #5 |
Try changing the "Starts the effect..." with "finishes casting" or add small wait on first line. I guess the ability being cast is some sort of sleep...the sleep effect probably starts AFTER the first pass through the loop => the condition fails on the first pass => the else statement is executed => it is not a problem when there is Do Nothing, but with "Skip..." it terminates the trigger. I hope you understand. |
| 07-15-2007, 07:53 PM | #6 |
I tried changing it to when a unit finishes casting and that still didn't help. The same effect (No damage) occurred. |
| 07-15-2007, 08:14 PM | #7 |
Add cca 0.5 sec wait on the first line of the trigger. |
| 07-15-2007, 09:32 PM | #9 |
That doesn't help... at all. My spell is already the level of MUI I want it to be, capable of having 1 per player. I don't think you understand my problem entirely Fluff... This is a sleep spell. Let's say Player 1 casts this spell on Player 2, which lasts 9 seconds. 2 seconds in after casting the spell, Player 3 wakes up Player 2 & casts the same spell. As a result, Player 1's damage (What would still be going on) & Player 3's damage are now affecting Player 2. The whole point of "Skip Remaining Actions" was for that case. (So the damages wouldn't bug and accidentally stack). |
| 07-15-2007, 09:41 PM | #10 |
Try the wait or I will have to try it myself :P |
| 07-15-2007, 10:00 PM | #11 |
Renamed thread to something slightly more descriptive. The complexity of your triggering is reaching the level where you would have an easier time writing and getting help with scripting JASS directly. |
| 07-15-2007, 10:13 PM | #12 |
What you want is actually simpler than this. You will need two triggers. Trigger 1: When the ability is cast, add the target to a unit group Trigger 2: Every second, loop through the unit group. If the a unit in the group doesn't have the buff, remove it from the group, otherwise deal damage to it. This will work well because it completely avoids using waits and checking for double-casting, etc. |
| 07-15-2007, 10:27 PM | #13 |
Strilanc... 1. Your method doesn't support leveling damage (X/X/X damage per second with level). 2. Your method also will not credit the caster for a kill if the target dies under this. |
| 07-15-2007, 10:42 PM | #14 |
You could fix the first problem by simply making 3 groups, or using a group array. |
| 07-16-2007, 12:32 AM | #15 | |
Quote:
Then use a couple arrays instead of a group. You'd need a target array and a caster array. Arrays will probably even be faster than groups because you'll know the index when you want to remove an element, letting you do it in O(1) time instead of O(n). |
