HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

What would work?

12-10-2006, 11:34 PM#1
darkwulfv
Collapse JASS:
if GetUnitCurrentOrder(wolf) == "cannibalize" then

(I didn't make the trigger this came from, a friend did)
GetUnitCurrentOrder returns an integer, but how do you compare it to make sure its true? (like if you wanted to check that the unit's current order was cannibalize).
12-10-2006, 11:39 PM#2
wyrmlord
Collapse JASS:
if GetUnitCurrentOrder(wolf) == OrderId("cannibalize") then
//code
endif
OrderId takes an orderstring and converts it into an orderid (integer).
12-10-2006, 11:49 PM#3
darkwulfv
ah, thank you.
12-11-2006, 06:25 PM#4
blu_da_noob
Or get Blade's useful little program here: http://www.wc3campaigns.net/showthread.php?t=85864. Converts directly to the ID for future purposes.