| 11-06-2003, 09:46 AM | #1 |
I am having a very annoying problem. I have made a custom unit ability based on the Item Wand of Illusions ability. I have given it the heal order string (I also tried curse, sleep and firebolt). I also have a dummy unit that uses the ability, and a hero dummy ability that triggers everything. My triggers work the following way: Event: The hero uses the dummy ability 2. Move (instantly) the dummy unit to the hero ands give it the illusions ability. 3. Cycle through all ranged, allied units within 900 range and order the dummy unit to cast the custom ability on the picked unit. But it for some reason doesn't work. I have tried with only one target, didn't work, I tried giving the dummy unit the heal spell and it did work with that spell. Also the order is never given (I have a debug trigger to show orders given), but the unit group that I cycle through is NOT empty. Can anybody help me, please? :bgrun: |
| 11-06-2003, 11:23 AM | #2 |
Not sure what you want to do but it sounds like you are making a mass mirror image ability (one mirror image of each unit in an area). For my upcoming map I already implemented this ability and it works like this: Make a unit ability mirror image (from hero ability). If your hero casts the dummy ability give all ranged units in range of your hero the unit mirror image ability and let them cast it. Set the cooldown really high that they cant use it again. I hope this helps. |
| 11-06-2003, 11:34 AM | #3 | |
Quote:
I tried that the units wouldn't follow that order either. I'm having a lot of problems getting units to do the orders I give them. :/ I'm currently making a trigger that turns on autocast for cold arrows for a custom unit with the spell, but they won't do it. Even though I gave the ability the innerfireon activate order string. I don't get it. :( Here is the trigger: ![]() |
| 11-06-2003, 11:40 AM | #4 |
edit: err ignore what I just posted. I need some sleep and I'll get back to you ,sry. that string you are using there just turns inner fire abilty to autocast, not to cast it. |
| 11-06-2003, 11:44 AM | #5 |
hm, its working for me. Just make a custom ability of the hero ability Mirror Image. Change it to unit ability. Important: Set needed mana to 0 else non magic users cant use it (like your ranged units). If your hero uses the dummy ability pick every unit (always use picked unit...) and give it the custom ability. Then order picked unit no point with order Orc - Blademaster - Mirror Image. (Sorry, dont have the editor here atm, else I would be more precise). Should work |
| 11-06-2003, 11:45 AM | #6 |
That explains it. :) So changing the orderstring of the ability in the ability editor doesn't make the order usable? Not even if I use UMSWE and use one of the added trigges? The Cold Arrows ability doesn't have any orderstrings so how do I turn on autocast for that one? |
| 11-06-2003, 12:25 PM | #7 | |
Quote:
The order string field is there just as a piece of information, it doesn't work. However there IS a way to order a unit to use any spell, but you'll need JASS, and to know the order ID. To know the Order ID You'll need A Silly trigger like this: Events: A unit is issued an order with no target A unit is issued an order targetting a point A unit is issued an order targetting an object Conditions: Actions: custom Script: DisplayTimedTextToPlayer(GetOwningPlayer(GetTriggerUnit()), 0.52, -1.00, 10.00, I2S(GetIssuedOrderId()) ) That will show a number like 856824 each time you order anything to an unit. Take an unit with cold arrows and activate them : Just at the moment you activate it you'll get a number, write that number in a paper or something. Now If you have UMSWE , you might have this action Unit - Issued Order with no target (takes Orderid) set the unit, and write that number as the orderid You can do this process with any ability. |
| 11-06-2003, 12:29 PM | #8 |
Thanks Vex I never would have thought of that :D . |
| 11-06-2003, 12:40 PM | #9 |
Thank you very much. :ggani: :ggani: |
| 11-06-2003, 04:19 PM | #10 |
What is it your trying to do exactly? get everyone in a radius to cast a spell? Why wouldn't you just have everyone in a radius to be under the effect of the spell? that accomplishes the same thing correct? You can edit the Staff of illusions ability into a normal unit ability (so that it works the exact same). Try that and just make a trigger so that it targets everyone around the unit. |
| 11-06-2003, 04:23 PM | #11 |
The problem was that I couln't get my dummy unit with the Wand of Items to cast the stupid spell, but thanks to Vex it now should work (I abandoned the idea and came up with a better one, that I still needed the help with though). |
| 11-25-2003, 11:01 PM | #12 |
I threw the line into a custom script, but the game didn't compile, saying it Expected 'call.' What on earth does that mean? EDIT: I threw in 'call' and it compiled properly, but the unit still did nothing-- it just sat there looking stupid. The order is placed within a running trigger: If (FalsusSomesExhaustion Greater than 0) then do (Trigger - Run (This trigger) (ignoring conditions)) else do (Unit - Order FScaster to (Order(852614)) (Position of FScaster)) The Trigger runs and subtracts 1 from a variable each time it runs; the caster unit learns the spell once per running; once the variable hits 0, he's ordered to cast the spell he's learned, but he doesn't do anything. Suggestions? |
| 11-26-2003, 03:33 PM | #13 |
i guess you didn't use umswe and that you are trying to throw the numbers to the convert order to string, use the Issue order targetting ___ (takes order id) |
| 11-27-2003, 02:54 AM | #14 |
I have UMSWE, and did that. |
| 11-27-2003, 01:23 PM | #15 |
add a wait of 0.00 seconds before it revieves the order |
