Thank you all, but, let me clear up some stuff because those answers are just not helping ;o...
1) I ONLY use the Channel spell (insta cast/no target) so it only needs 1 function.
2) I need to find the ability's ID BEFORE he casts it lol (it's a turn based game and he won't cast anything until ordered, this is just a test trigger). I want it to check the ability ID of an ability variable (between: Ability_1, Ability_2, Ability_3 and Ability_4).
3) I don't mind using the ID or string to order, but I can't find the order until AFTER it's cast so I tried with the ID (Which is why it does not set Integer_Test to triggering ability but simply to Ability_A, my variable, which seems to work as to gathering the ID):But it doesn't seem to work when I order the unit to cast it through the ID and I don't understand why:
- Untitled Trigger 001
- Events
- Unit - A unit Starts the effect of an ability
- Conditions
- Actions
- Wait 0.01 seconds
- Custom script: set udg_Integer_Test = udg_Ability_A
- Game - Display to (All players) the text: (String(Integer_Test))
- Untitled Trigger 002
- Events
- Player - Player 1 (Red) types a chat message containing a as An exact match
- Conditions
- Actions
- Custom script: call IssueImmediateOrderById(udg_Monster_1, udg_Integer_Test)
- Game - Display to (All players) the text: (String(Integer_Test))
I meant that they are all based off channel. But there is a lot of abils with each a different spell ID, which needs to be retrieved in-game and then used as a string or integer (w/e works is good for me) to be plugged in the instant/non target cast order.
(There is a huge pool of abilities that it could cast)
This might be off-topic, but I'd like to correct you here.-Kobas- said:Blizzard use 0-9 A-Z values to code huge integers. .
So you would need name-order pairs. Which essentially means making 2 variable arrays. 1 for names and 1 for orders.
You can make the arrays fill automatically or define every value yourself. I don't really see any other way.
In that case the trigger would loop through all possible strings(names) and if it finds one that matches, then it orders the order from another array and the same index.
AbilityName[378] orders AbilityOrder[378]
Stop complicating your life and use string orders, there's a reason they exist.
Btw all you need is this:
http://www.thehelper.net/threads/order-ids.148097/
Stop complicating your life and use string orders, there's a reason they exist.
That is what I feared, I wanted to find a simpler way.
That's just dumb and doesn't help anything, especially not my problem. And I would love to use string orders if they could be found BEFORE cast.
That's actually more complicated and will take more processing time than using pairs (abil = order).
If anyone knows of another way besides a dummy getting the ability, then trying to cast them all until he finds which ability he has through the order (which is "upside down" if u ask me) it would be great!...