• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Order ID question

Status
Not open for further replies.

ABM

ABM

Level 7
Joined
Jul 13, 2005
Messages
279
Hi everyone
I would like to know the string of an Order ID...

When a unit is loaded into a boat for example:
it is: -load
When the loaded unit click on the ability to exit:
it is: -unloadall
But what is the order ID of a loaded unit wich exit by clicking on the loaded unit picture ?


and also do you have a script to display all order ID string from order made by an unit belonging to player1 ?
i tried:
  • order display
    • 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
      • (Owner of (Ordered unit)) Equal to Player 1 (Red)
    • Actions
      • Game - Display to (All players) for 5.00 seconds the text: (The last order from unit was + (String((Current order of (Ordered unit)))))
but it doesn't work well, it doesn't display half of the orders...
the text show "The last order from unit was "

(empty string), it work for move, smart, attack, unloadall but don't work for other ability used and for the click on picture to unload....
 
Level 26
Joined
Aug 18, 2009
Messages
4,097
But what is the order ID of a loaded unit wich exit by clicking on the loaded unit picture ?

There is none directly. Afaik when the loaded unit has the ability Defend, it does "undefend" when leaving a transporter but this is also done on other ocassions.

but it doesn't work well, it doesn't display half of the orders...
the text show "The last order from unit was "

(empty string), it work for move, smart, attack, unloadall but don't work for other ability used and for the click on picture to unload....

There is the event response Issued Order that refers to the triggering order of your events. Still, not all orders have an alphanumeric id, for example when you buy a unit from a shop, the order will equal to unit's type's object id, which is numeric, but there is no string variant. Also, current order function cannot work for all orders since not all are processed over time.

edit: Just tested a bit. The transporter does "unload" and the passenger "stop". Used normal zeppelin. "Undefend" is only done on entering.
 

Dr Super Good

Spell Reviewer
Level 63
Joined
Jan 18, 2005
Messages
27,192
Not all OrderID have an associated string for them. Examples of those which do not are item inventory rearrangement orders, the order to make a unit use the wand of illusion item ability (when made a unit ability) and build orders for custom buildings (the order is the unitID of the selected building).

For your detection script, if the order string is empty you should then output the orderID (its an integer) and note down how it acts (like what ranges do what).

If you want a chat command to run them, you can create a mapping system which in your command interpreter converts a string you assigned for the order into its actual ID so you can issue it.
 

ABM

ABM

Level 7
Joined
Jul 13, 2005
Messages
279
Hum, i see....
thanks for your answer ^^

so detecting ID is difficult because not all of them are string...

well i was interested mainly in the exit boat and i think that it was stop, but i though that it couldn't be that, since WaterKnight also found stop for exit, then i think i will use this id to detect when a player exit the boat this way :)
the exit detection trigger will run with (stop) ID and (unloadall) ID, maybe i will add (unload) ID too to be sure....

thanks all ^^
 
Status
Not open for further replies.
Top