| 05-04-2004, 07:09 PM | #1 |
Ok I'm making a spell where I need to order a unit to cast the ability being cast by another unit and I'm pretty sure I heard it was possible through JASS to convert an Ability into an Ordercode but I can't remember how you do it. So my question is what's the JASS function for converting an ability to an ordercode? Thanks in advance. |
| 05-04-2004, 07:41 PM | #2 |
If your trying to make a unit cast a acustom ability, all you have to do is use the 'Unit - Issue Order Tageting a' action and for the ability, place in the ability you based yours of off. Say you made a fireball spell off of firebolt and wanted to tell the a dummy caster to cast fireball. YOu would say 'Unit - Issue Order Targeting a Unit: Neutral Firebolt' to make it cast the spell. This works because the orders trings of custom abilities are still the same as the base ability. |
| 05-04-2004, 08:52 PM | #3 |
No that's not what I'm trying to do. What I want to do is say have Event - Unit casts ability. Action - Issue Order (ordercode of ability)...? How can I do that? |
| 05-04-2004, 09:12 PM | #4 |
You mean the Order Activation String on the bottom of the screen of the ability editor, right? They changed it in a more recent patch so you don't have to use Jass anymore. Here's an example of a spell. With this the dummy unit will cast any spell with the same order string as Tunder Clap. If you still don't believe me, the Jass finction to cast an ability is listed below the trigger. Code:
Events
Unit - A unit Begins casting an ability
Conditions
(Ability being cast) Equal to New Spell
Actions
Unit - Create 1 DummyUnit for Player 1 (Red) at (Center of (Playable map area)) facing Default building facing degrees
Unit - Order (Last created unit) to Human Mountain King - Thunder ClapJass function: Code:
call IssueImmediateOrderBJ( <UnitName>(), "<OrderString>" ) Note: Just be sure to remove the <>'s if you use the Jass function. |
| 05-04-2004, 09:40 PM | #5 |
This is not what he wants. Unfortunately there is no native to get that info. The only way I can see is to store that mapping yourself, best in gamecache. Of course that means you have to put every single ability id with the corresponding order id in there, that might be needed. |
| 05-05-2004, 11:15 AM | #6 |
THANK YOU AIAndy, I thought I'd described myself clearly enough but evidently not for everyone. Anyway I was sure it was possible, ah well thanks for the reply I'll look into that way of doing it. |
| 05-05-2004, 03:44 PM | #7 | |
Quote:
|
