HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Cancelling units

11-19-2003, 01:08 AM#1
Daro
How can you reference a unit that has been cancelled from the event "A unit cancels training a unit"?
How can you cancel a building's construction through triggers?
How can you cancel a unit's training through triggers or force a pressing of the escape key?
Thanks for any help.
11-19-2003, 04:27 AM#2
AIAndy
With this JASS line you can cancel stuff:
call IssueImmediateOrderById(udg_building_unit, 851976)

udg_building_unit needs to be replaced by the unit variable of the unit that builds or trains.
11-22-2003, 04:20 PM#3
Daro
Thanks, that worked. Any ideas on the other two?
11-22-2003, 04:43 PM#4
AIAndy
Well, which questions do you think have not been answered yet?
The custom script line I posted works to cancel both units and buildings.

If you want a reference to a cancelled unit then that is not possible (they do not exist as unit reference yet at that point) but you can get the unit type by using Trained Unit Type.