| 08-27-2009, 07:21 PM | #1 |
Is there any way to make a dummy unit cast a spell like for example shadow strike in fog on a unit? Would kinda save me alot of triggering >< |
| 08-27-2009, 09:17 PM | #2 |
I'm pretty sure dummy units don't need vision to execute an order... Has the order not been working? Make sure the unit has the ability, has mana, and is not allied to the target unit, and that you've used the right order. |
| 08-27-2009, 09:20 PM | #3 | |
Quote:
Simply do the following: JASS:local player OriginalOwner = GetOwningPlayer(DummyUnit) call SetUnitOwner(DummyUnit, GetOwningPlayer(TargetUnit)) call IssueTargetOrder(...) call SetUnitOwner(DummyUnit, OriginalOwner) |
| 08-27-2009, 09:33 PM | #4 |
That's good to know. I guess you'd need to make sure the spell could hit allies. That's pretty simple though. |
| 08-27-2009, 10:05 PM | #5 |
Er... Dusk, won't that cause any instant spell to be credited to the wrong player? For instance if it's a killing spell, will the player, or the killed player get bounty? Just use UnitShareVision otherwise? |
| 08-27-2009, 10:21 PM | #6 | |
Quote:
The best way to do things is to just avoid using target spells whenever possible. The only thing you should use them for ever is stun. (And silence, though that can almost perfectly be reproduced) |
| 08-28-2009, 12:54 PM | #7 | |
Quote:
|
| 08-28-2009, 01:05 PM | #8 |
Hrm. That might fix the silly invisible-cast bug then. I remember testing that and not using it for some reason... I wish I had a better memory or kept notes or something. |
| 08-28-2009, 05:30 PM | #9 |
UnitShareVision doesnt seem to work, gonna try Dusk's suggestion, but i got a question. If i use this method will the owner of the dummy caster get the bounty+xp? |
| 08-28-2009, 07:05 PM | #10 |
Yes, if you use this method for a dummy spell that will kill the target. What you should do, however, is have the dummy spell perform effects only, such as stun, and then for damage simply trigger the effect. |
| 08-28-2009, 07:13 PM | #11 |
I use a very simple solution for this in my custom abilities. I just make a minor visualization dummy at the target area/near target unit in fog maps. Problem solved. Or I'm getting this wrong? |
| 08-28-2009, 07:56 PM | #12 | |
Quote:
JASS:call UnitShareVision(target, .owningplayer, true) call IssueTargetOrderById(dummy,this.oid,target) call UnitShareVision(target, .owningplayer, false) |
| 08-28-2009, 08:35 PM | #13 | ||
Quote:
Quote:
Ani, that works on invisible units to the source player too, correct? |
| 08-28-2009, 08:48 PM | #14 |
What I did was use the sheep staff sample in the xe6.0 demo map (before testing, I set the corresponding xecast calibration constant to true) from behind some trees so I had no vision of the targeted area. The owning player of the xecast object (and therefore the dummy unit) in that sample is set to the owner of the casting unit, which was me. I had no vision of the targeted area and indeed in a previous test before I changed the calibration constant to allow this it didn't work. |
| 08-28-2009, 10:48 PM | #15 | ||
Quote:
Quote:
I didnt get Dusk's method to work either (Im using both GUI and Jass if that has anything to do with this? xD) |
