| 09-13-2003, 10:32 PM | #1 |
I trying to find somehow to make a unit variable that refers to a target of an ability, such as siphon mana, holy light. Nonetheless, I couldn't figure out how this is done. There are no functions that refers to this event response and other functions such as targeted unit simply haven't worked. Can anyone help me out? Thanks for help. |
| 09-14-2003, 12:16 AM | #2 |
Well, have a trigger with the event of a unit casting a spell. Now use condition(s) to check the ability being cast and the unit casting it if neccesary. Then, for the set variable part, set it to the targeted unit or target of issued order; some others would work as well. |
| 09-14-2003, 06:07 PM | #3 |
None of the functions have worked for me. It seems that the editor doesn't recognize the event response or the unit which I'm trying to refer. I've also tryed event: unit acquires a target, condition: ability being cast = holy light, action: set targeted_unit(the variable) = (targeted unit), but it hasn't worked neither. Would you please post a screenshot of the trigger? |
| 09-14-2003, 06:21 PM | #4 |
SEARCH function pwns. Well u got an ability trigger like: Code:
TriggerSpell
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to SPELL X
Actions
Whatever you wantthen you just need a second trigger like... Code:
SpellTarget
Events
Unit - A unit Is issued an order targeting an object
Conditions
(Issued order) Equal to (Order(SPELL*))
Actions
Set SpellTargetUnitVariable = (Target unit of issued order)Then you can use the SpellTargetUnitVariable in the first trigger.. Important is: SPELL* = "Text - Order String - Use/Turn On" in the ability editor If you edit stormbolt you still need to enter "thunderbolt" there and if u edit holy light to holy heal, you still need to put "holybolt" in.. if u edit slow to "magic chains", you still need to put "slow" in. ... pretty easy |
