| 08-20-2003, 02:30 AM | #1 |
I wrote a special effect for a stormbolt/death coil like spell. But if the caster is far away from the target and casts it, the special effect will appear before the spell actually hits it. So I want it to show only when the enemy's HP is reduced. Can it be possibly done through triggers as well ? |
| 08-20-2003, 02:36 AM | #2 |
Maybe if you use the Unit Life = # trigger.... |
| 08-20-2003, 02:39 AM | #3 |
What you need to do is: PolledWait(distance from target / projectile speed) It'll be a bit more involved for homing projectiles or if you're really anal and want it to work even if the unit moves. But that should give you a basic idea :ggani: |
| 08-20-2003, 02:49 AM | #4 |
Yea for convenience I disabled the Homing Missles property lol. So the issue is, the special effect still appears even if the target is a long range from the caster. Sorry I don't get what it means Juvat, what's 'unit life = # trig ' ? |
| 08-20-2003, 06:16 AM | #5 |
you could have a trigger that registers when the deathcoil thing is cast, which puts the target unit in an array (lets call it unitTarget_A), and then set the custom value of the casting unit == to the index of the array uniTarget_A then, i'm assuming this would work, but have a trigger register when the effect of an ability occurs, and check what index of unitTarget_A the unit is, compare it to the custom value of the casting unit, and if they match, then thats when you can play the ability of course, its possible and much easier to do it without an array and the custom value, but without it, you can only have 1 unit cast the ability at a time, with the array, as many units as you want/allow can cast the ability and it will still register correctly this is assuming that the event works when the deathcoil hits |
| 08-20-2003, 06:48 AM | #6 |
Yes using array would enable multiple players casting this spell at the same time. However it can't solve my problem, that is, when the target unit is far away from the hero, he/she has to walk some distance to enter the casting range in order to cast the spell (after he/she was given the order to cast), but the special effect already appears when the hero *clicks* on the target unit. :( |
| 08-20-2003, 07:28 AM | #7 |
if only you there was a way to refer to the unit that the spell is being casted on, you could make a trigger like, EVENT-- when unit uses "the spell" Action-- Wait untill the life of the targeted unit decreases Special effect .... I might be completely off... i dont really undrestand what your problem is. the effect doesnt usually apear when u click on the target, it apeares when the spell is being casted. |
| 08-20-2003, 07:42 AM | #8 | |
EDITED Quote:
Althought you can't refer to a 'targeted unit' during a casting event....that's sorta things I was looking for, but what's the exact trigger commands for it ? |
| 08-20-2003, 08:41 AM | #9 |
well its called "wait for condition" but i think its only on TFT. |
| 08-20-2003, 08:50 AM | #10 |
Yay... Many thanks |
