| 06-22-2007, 12:44 AM | #1 |
I need to cast a spell on a unit that I do not have vision of. However, the IssueTargetOrder() to make a dummy cast on the unseen unit always returns false when cast upon units you cannot see. Is there any possible way to cast a spell on a unit you cannot see without giving yourself vision of that unit? Note that I cannot have a neutral or another player cast the spell since then it won't properly give kill credit. Ideas? I put it here because it's not really a trigger question. |
| 06-22-2007, 01:05 AM | #2 |
Hm, well, one way that I can think of might be to use an AoE spell targeted on the area, but you'd have to have at least split-second vision of the point for the spell to start, after which it wouldn't matter. To the players, that might not be noticeable. Then again, that might work without bothering to use AoE anyway. Make sure your casting unit has no mobility whatsoever (so that it won't try to turn before casting) and then create it at the point of the target unit, grant visibility of that mote to the player, and cast the spell. Then take visibility away again. If the only purpose of the spell is damage, however, you might as well just trigger the damage using the Unit - Damage a Unit [sic] action. |
| 06-22-2007, 01:39 AM | #3 |
Isnt there a condition "unit is visible/invisible" to player in boolean type in triggers? I never used it be4 but i can see the condition there |
| 06-22-2007, 01:58 AM | #4 |
The condition is there, but I am already 100% certain the unit is unable to be seen. I really didn't consider this a trigger question since there could be a game feature or trick I'm overlooking. *Shrugs* And using the target area wouldn't quite work either, nor can I just trigger the damage. The abilities in question are DOT and have other effects such as reducing armor on the unit and such. I am not going to have timers deal damage and such, that's very unnecessary for a very simple mechanic. |
| 06-22-2007, 02:39 AM | #5 | |
Quote:
The spell mechanic may be simple, but the targeting mechanic isn't. I believe there is a delay as to how fast the FoW changes, so applying vision and then removing it again may not work as expected without some sort of timer. |
| 06-22-2007, 02:44 AM | #6 |
Hmph how about setting the dummy caster to the owner of the invisible unit? If it was me I'll use the caster sys's damager group for the DoT. |
| 06-22-2007, 06:25 AM | #7 |
http://www.wc3campaigns.net/showthread.php?t=94061 There's no cut and dry solution, but if you make a dummy owned by a neutral player who controls a global detecter do the effects such as stuns and other debuffs, and the triggers do all the damage it would work. This is the best solution that either Blu or I could come up with, so it's your best bet. |
| 06-22-2007, 07:21 AM | #8 |
shere vision of the target for a moment |
| 06-22-2007, 07:41 AM | #9 | |
Quote:
It seems that even if sharing vision for a moment, the unit doesn't become "visible" in that moment. I would hate to have to trigger the damage... Hrm... I'll think about it. |
| 06-22-2007, 08:16 AM | #10 |
damage event run just before damage dealt, change owner of the dummy caster on damage event. also you may try to reveal single cell (32*32 rect) that contain target |
| 06-22-2007, 08:50 AM | #11 |
Test it, you may attack unseen units and do any with out revealing |
| 06-22-2007, 02:18 PM | #12 |
I just modified your map to test with spells and the good news is that it works perfectly. I attached my version so you can test with it (note: it didn't work without removing the 'Amov' ability, the MK just didn't cast). Learn Storm Bolt and press escape if you want to test. Summary: Make sure your unit can cast instantly (remove 'Amov' and 0. cooldown/backswing times etc) Set owner to same owner as the target Cast ability Instantly change owner back to the original owner Works, and won't interfere with anything (good for the buff system if this is in relation to that). |
| 06-22-2007, 05:40 PM | #13 | |
Quote:
If yes, you've saved my life. I'm going to test now either way. |
| 06-22-2007, 05:42 PM | #14 |
Yes. The test map shows that (with bounty on the shade). Edit: Aah, DoT. Hmm, it should. |
| 06-22-2007, 06:10 PM | #15 |
Works beautifully. Thank you infinitely guys! <3 |
