| 09-01-2006, 05:34 AM | #1 |
Perhaps most of you are familiar with the "Select Hero" ability that shop buildings have, that allows the selected unit to allow a certain extent of control over the selecting unit's abilities. I would like to know, if there's any way to get the selected unit from within a trigger. Casting unit doesn't work...it picks the selecting unit instead of the selected one. Any ideas anyone? |
| 09-01-2006, 10:02 AM | #3 |
Nope, that would select the unit which the ability cast was targeted. Perhaps I should rephrase myself. Unit A has "select hero", and another ability (anything at all). Unit B goes up to Unit A, and gets selected (arrow on his head). Owner of Unit A (does not own Unit B) now is allowed to use Unit B's ability (might be on Unit C, or just on nothing at all). Target of ability being cast returns Unit C, or nothing at all if the ability is not targeting, while casting unit returns Unit A. How do I get Unit B, or the owner of Unit B? I've exhausted everything I know about triggers on this...I'm wondering if I used JASS and some locals, is there some (probably haxxy) way I could do it? |
| 09-01-2006, 11:42 AM | #4 |
If unit B is casting an ability, Casting Unit should return unit B unless has some weird way of handling this. |
| 09-04-2006, 06:45 PM | #5 |
Uh yes, a mistake on my part. I meant (ignoring my previous faulty example), how do you get the selected unit...the dood with the arrow on his head. Its that which I'm having trouble with. |
| 09-04-2006, 06:56 PM | #6 |
try Target Unit of ability being cast or something |
| 09-04-2006, 06:59 PM | #7 |
Actually I've tried ALL the triggered event responses...haha, yes..thats right..ALL... i feel like I have no life...nothing better to do than to fool around with triggers till one of them magically decides to start working...but no luck. Anyone got any ideas on how to work it in JASS? |
| 09-04-2006, 07:02 PM | #8 |
Try detecting the buff on nearby units. |
| 09-04-2006, 07:09 PM | #9 |
Hmm, care to elaborate? What buff exactly are you talking about? Select a unit doens't apply buffs it seems... |
