| 02-03-2004, 11:42 PM | #1 |
I'm trying to detect which unit is being healed by holy light but it doesn't seem to work. Here is my test code Holy Light Copy Events Unit - A unit Finishes casting an ability Conditions (Ability being cast) Equal to (==) Holy Light Actions Custom script: local unit udg_targetunit Custom script: local unit udg_castingunit Set targetunit = (Target unit of ability being cast) Set castingunit = (Casting unit) Unit - Explode (Target unit of ability being cast) Unit - Explode (Target unit of issued order) Unit - Explode castingunit Game - Display to (Triggering player), at offset (0.00, 0.00) the text: Holy Light Can someone help me i just don't get how to find the target of a holy light. |
| 02-03-2004, 11:56 PM | #2 |
I don't know about the holy light thing, but I do know that it won't work if you have two different GUI locals in one trigger. Try setting them both to globals and see if it works. |
| 02-04-2004, 12:02 AM | #3 |
simple E:unit is issued an order C:issued order equal to [holylight] A:set TargetUnit equal to target of issued order A:set Caster equal to ordering unit a: run trigger 2 trigger2: E: C: A:explore caster unit A:explore target unit u can merge it into 1 trigger, or add various stuff to the other.... |
| 02-04-2004, 12:06 AM | #4 |
Nope didn't work.. Hmmm There has to be someone who has tried to also detect holy lights target and whether or not they were able to. Here is my new code now: Holy Light Copy Events Unit - A unit Finishes casting an ability Conditions (Ability being cast) Equal to (==) Holy Light Actions Unit - Explode (Target unit of ability being cast) Unit - Explode (Target unit of issued order) Unit - Explode (Casting unit) Game - Display to (Triggering player), at offset (0.00, 0.00) the text: Holy Light |
| 02-04-2004, 12:22 AM | #5 |
maybe the order is not holylight .....have u made custom ability of holy light, or u'r using the original one ? if u made i copy, maybe thats the problem.... i'll post u the triggers tommorow... |
| 02-04-2004, 12:28 AM | #6 |
I can assure you target unit of ability being cast works for Holy Light because I used it to create an AoE Holy Light not very long ago. I would guess your using the wrong ability in the ability comparison, |
| 02-04-2004, 12:34 AM | #7 |
There is a bug. (Target unit of ability being cast) doesn't work with Finishes casting an ability. |
| 02-04-2004, 12:37 AM | #8 |
ah yes absolutely right there, "begins the effect of an ability" plus a short wait is better. It's also worth noting "finishes the effect of an ability" may not actually fire, if an ability is cancelled mid-cast the primary effect can occur (healing) but the "finishes the effect" event never happens. As such I consider it an unreliable event that shouldn't be used, or should only be used with considerable care. "Begins the effect of an ability" seems by far the most reliable. |
| 02-04-2004, 01:31 PM | #9 |
Thank you all for your help i was positive i tried it with the begins casting event but i guess i didn't try it with those triggers. Thanks again :). My next question is basically i'm making a HolyLight based off of channel so i can mod it better. But if you use Begins (This applies to holy light as well) you'll do damage to the unit before the graphic shows up. Now i know i can add waits but thatz not really the way i prefer to do things. With waits things can get screwed up if its being casted at the same time. Is there any other way i can tell when holy light is finished without screwing with the trigger (It not working with overlapping use). Thankz again. |
| 02-04-2004, 05:07 PM | #10 |
try, E: a unit starts the effect of an ability C: ability beeign cast, holy light |
| 02-04-2004, 05:10 PM | #11 |
Thankz i'll try that when i get home. Currently i'm just using a second trigger that checks for that event then sets a Bool to true. |
