• 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.

[Trigger] How to use an order id

Status
Not open for further replies.
Level 5
Joined
Mar 6, 2015
Messages
130
Well i want to create a special system.this system copies every order which is given to a unit to hashtable by storing its id but how can i convert back the id to order and how can order a unit to do that because there is no GUI clue for it so i need to know which script code should i use for giving a stored order to units.
Thanks in advance
 
Level 24
Joined
Aug 1, 2013
Messages
4,658
You want an order tracking system?
Is this essential for your map or not?

An order tracking system is not that easy to make and especcially in GUI.
If it is not essential for you map then I suggest you to just leave it (for now) and learn JASS before you want to make it.

(I currently have a snippet for it but it is far from useable.)
 
Level 5
Joined
Mar 6, 2015
Messages
130
well i can`t use vjass libraries in my map even with jassNewGen so is there a custom script to convert an id to a order or not ? order tracking is essential for my Spell Reflection System because i already have the Last Spell so i need its order to perform it again Note that i have the order id and it`s type i just want to convert it back to order
...
 
Orders can be done via string, but also directly via orderId. (ordering via OrderID is slightly faster I believe)

These are the native order-functions that take the orderId as paramter:

JASS:
native IssueBuildOrderById takes unit whichPeon, integer unitId, real x, real y returns boolean

native IssueImmediateOrderById takes unit whichUnit, integer order returns booleannative IssueInstantPointOrderById takes unit whichUnit, integer order, real x, real y, widget instantTargetWidget returns boolean

native IssueInstantPointOrderById takes unit whichUnit, integer order, real x, real y, widget instantTargetWidget returns boolean

native IssueInstantTargetOrderById takes unit whichUnit, integer order, widget targetWidget, widget instantTargetWidget returns boolean

native IssueNeutralImmediateOrderById takes player forWhichPlayer,unit neutralStructure, integer unitId returns boolean

native IssueNeutralPointOrderById takes player forWhichPlayer,unit neutralStructure, integer unitId, real x, real y returns boolean

native IssueNeutralTargetOrderById takes player forWhichPlayer,unit neutralStructure, integer unitId, widget target returns boolean

native IssuePointOrderById takes unit whichUnit, integer order, real x, real y returns boolean

native IssueTargetOrderById takes unit whichUnit, integer order, widget targetWidget returns boolean

For example you have the integer "851972" (ID for "stop") then in custom script it can look like:

  • Set Unit = MyUnit
  • Set Int = LoadInteger.. (851972)
  • Custom script: call IssueImmediateOrderById(udg_Unit, udg_Int)

If you need the order string you can use following native to convert the integer to order string:

constant native OrderId2String takes integer orderId returns string
 
Status
Not open for further replies.
Top