| 12-19-2006, 10:47 PM | #1 |
Hi, I am making a Custom Sleep based on Storm Bolt, but I found some problems: 1) I can't use "A unit starts the effect of an ability" because it will work also with items which dispel spells and this is not good. 2) I use a damage detection system to see when the unit is actually hit by the spell (he must have the stun buff), but the trigger will fire also if the unit is damaged while he's stunned, not only the first time. How to solve this? 3) I can't dispel the buff the first time and then use a caster to stun him again, because I turn him invulverable the first time. Any help will be appreciated! |
| 12-19-2006, 10:51 PM | #2 |
You cant despell Stun. Changing the buff only changes the animation, not the stun |
| 12-19-2006, 10:57 PM | #3 | |
Quote:
What do you mean? I CAN dispel the stun buff using triggers, this is not my main problem. |
| 12-19-2006, 11:48 PM | #4 |
Maybe I've found a solution, what if I add these conditions: JASS:if ( ( GetUnitCurrentOrder( source ) == OrderId( "thunderbolt" ) ) and ( GetUnitAbilityLevel( source, 'A01X' ) > 0 ) ) then // do actions endif // where source is the caster // and A01X is the Custom Sleep Is it unique? I mean, the trigger will fire only 1 time? It seems to work... Any idea? |
| 12-20-2006, 01:58 AM | #5 |
I don't get it. What does this triggered sleep have that makes it so you can't do it with the normal Sleep? |
| 12-20-2006, 03:57 AM | #6 |
I'm not quite sure what you're asking in your first question. For your second problem, I'd suggest setting some boolean variable to true after the damage detect goes off the first time, and then set it to false when the unit is no longer stunned or whatever. Then just check that variable when the unit is damaged. With your third problem, just check if the unit is invulnerable, and if so just set the unit to not invulnerable. |
| 12-20-2006, 10:10 AM | #7 | ||
Quote:
I want a sleep which can be ONLY dispelled by physically attacking the sleeping unit, not with a spell/dispell etc...Quote:
Actually my second solution (current order check) works quite well, is there any problem that you can find with it?? Thanks! |
