| 08-28-2004, 04:35 PM | #1 |
Hi. I've seen this done in a few maps, so I'm wodnering how it is done. The spell creates a duplicate mirror image unit of the target unit. What is the base spell? |
| 08-28-2004, 04:51 PM | #2 |
well... is it a duplicate or mirror image? its a dummy spell either way, but then for a duplicate you have to create 1 unittype of targeted unit but for mirror image, you have to give the targeted unit mirror image, make him use it, then remove it. |
| 08-28-2004, 05:09 PM | #3 |
It's both. The spell creates a mirror image duplicate of the targeted unit, under the control of the caster of the spell. And no, it's not giving mirror image to the target and then removing it, because the spell targets heroes too. I think there is a base skill that actually does this. |
| 08-28-2004, 05:21 PM | #4 |
i dont think so.. you can add\remove spells from heroes too.. and the only problem with that way would be targeting a unit that already has mirror image. but you could check to see if it already has it then if it does, get the level of the spell,, remove it, add it back and give it that many levels. |
| 08-28-2004, 05:39 PM | #5 |
Could the base for the spell be the "wand of illusion" ability? |
| 08-28-2004, 05:50 PM | #6 | |
Quote:
Exactly, that's what I'm looking for. I knew the answer was a simple one, but it just wouldn't come to me. |
| 08-28-2004, 06:10 PM | #7 |
One problem though. The wand of illusion ability has got no order string. I can base the spell off it, but the spell needs to do other things as well, and the current base spell does it for me. What I need is for a dummy caster to do the wand of illusion ability for me, but since it has got no order string, how do I do this? |
| 08-29-2004, 04:45 PM | #8 |
No one knows how to do this? |
| 08-29-2004, 05:08 PM | #9 |
You can cast spells without orderstrings using their order ID. Firs, you need to know the orderID of the wand of illusion spell. To do this, give the ability to a regular unit so you can cast it manually. Then you need a trigger like this: Code:
Events A unit is issued an order targeting a point A unit is issued an order targeting an object A unit is issued an order with no target Conditions Actions: Custom SCript: call BJDebugMsg(I2S(GetIssuedOrderId())) This will give you a number, the orderID. It should be something long, something like 856703. Then, you can use this ID (write it down) to cast the spell with triggers, using the following functions: native IssueImmediateOrderById takes unit whichUnit, integer order returns boolean native IssuePointOrderByIdLoc takes unit whichUnit, integer order, location whichLocation returns boolean native IssueTargetOrderById takes unit whichUnit, integer order, widget targetWidget returns boolean Here's a practical use of this, a copy from one of my triggers that orders a just created dummy caster to cast spellshield onto a point stored in a variable: Code:
Custom script: call IssuePointOrderByIdLoc( GetLastCreatedUnit(), 852572, udg_TempCSPoint[GetForLoopIndexA()] ) |
