• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Learn Ability order ?

Status
Not open for further replies.
Level 37
Joined
Mar 6, 2006
Messages
9,243
The order id is different for every ability.
You can detect orders with something like this:
  • OrderID
    • Events
      • Unit - A unit Is issued an order with no target
      • Unit - A unit Is issued an order targeting a point
      • Unit - A unit Is issued an order targeting an object
    • Conditions
    • Actions
      • Custom script: set udg_i = GetIssuedOrderId()
      • Game - Display to Player Group - Player 1 (Red) the text: (String(i))
      • Custom script: call BJDebugMsg(OrderId2String(udg_i))
      • Custom script: call BJDebugMsg(I2S(GetHandleId(GetTriggerEventId()))
      • Game - Display to Player Group - Player 1 (Red) the text: (String((Issued order)))
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
Or just ?
  • Order ID Check
    • Events
      • Unit - A unit Is issued an order targeting an object
      • Unit - A unit Is issued an order targeting a point
      • Unit - A unit Is issued an order with no target
    • Conditions
    • Actions
      • Game - Display to (All players) the text: (String((Issued order)))
No need to complicate stuff using custom script -,- (or you're doing something different, more than showing orders?)
 
Level 9
Joined
Nov 19, 2011
Messages
516
Learn Skill

I need to know what's the "Learn Ability" order.

"What is <<Learn Ability>> order" its not mean that he wants to know IDs.
(originaly "Learn skill" I hope you mean that)
Learn ability works for heroes in this way:

(Acction)
Learn skill for (A unit) : (Skill kind)

A unit may be for e.g. Triggering Unit that refers unit used in event, or just your variable. Skill kind is a base skill that was used to make your skill, so remember well that you used. That acction will work only work for heroes that have at last one unspended skill point. Other way use "Upgrade level of ability for unit" or "add ablitity for unit" acction.

Spells and abilities are not exacly orders. When you want call them in conditions use ability condition: Ability beaing cast <> (for e.g.) Blizzard.

(Event)
Unit start casting a spell
Unit start useing ability //For immolination kind skills
(Condition)
Ability beaing cast <> (for e.g.) Blizzard
(Acction)
Quest Message - That was not blizzard.
 
Last edited:
Level 11
Joined
Nov 15, 2007
Messages
800
I needed it for a condition "Order different of XXX"

You mean you need it for a condition as in, "Issued order not equal to learn hero ability"?

I imagine you'll have to save the issued order ID to a variable and do an integer comparison.

I don't even know if learning an ability has a unique order ID, though.
 
Level 9
Joined
Nov 19, 2011
Messages
516
I think learning ability has diffrent ID coz of diffrent string version. AHbz is 'Blizzard' while you are makeing spell in editor (or learn it), but when make an order to use skill, all xxxx:AHbz skills are 'Blizzard', no matter which spell you think about. So chain lighting (Thrall) has same id as Deamon Shock (Demonologist form Island Defense). I hope you know what I mean.
 
Status
Not open for further replies.
Top