HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Canceling training orders via triggers?

12-11-2003, 02:04 PM#1
Sen
Is there a way to cancel training orders, or just clear the entire que with triggers/JASS?

The way I am doing it now is to replace the building with another of the same type but obviously this is not optimal as it gets removed from the control group that it was in.

I'd LIKE to just cancel trainings of a specific type, but even just canceling or clearing the entire training que would be a great improvement over what I have now.


Thanks!
12-11-2003, 08:00 PM#2
Kerry
Try ordering the unit to 'stop', not sure if it works though.
12-11-2003, 08:23 PM#3
Hunter0000
make a trigger to dectect all orders, then printing the order code. Then go in game and cancle a que and watch for the ordercode. Bingo!
12-11-2003, 08:31 PM#4
AIAndy
There is an order id for cancel but strangely it does not have an order string.
call IssueImmediateOrderById(u, 851976)
This does the same as when a user clicks the cancel button on the unit u so to clear the entire queue you have to repeat it.
12-11-2003, 10:34 PM#5
Sen
Quote:
Originally posted by AIAndy
There is an order id for cancel but strangely it does not have an order string.
call IssueImmediateOrderById(u, 851976)
This does the same as when a user clicks the cancel button on the unit u so to clear the entire queue you have to repeat it.


Great insight andy!! Thank you so much this is exactly what I need. BTW my name is CloudPrime at the Jass Vault, you have made some great contributions there.

Oh and... how did you find this out?
12-11-2003, 10:47 PM#6
AIAndy
I made some triggers that catch all issued orders and display all the information about it (order string, order id, target unit type, ...).
Then all I had to do was using the command/ability I was interested in ingame.
12-11-2003, 11:12 PM#7
Sen
Ah, I did a similar thing, but all I knew about were the order strings at the time and I guess the idea that all you could get was order strings stuck in my head.

Thanks for your help =)