{"name":"direction","operator":null,"title":"direction","type":"command","url":"https://community.bistudio.com/wiki/direction","revid":376966,"updated":"2026-01-01T05:58:04Z","groups":["Object Manipulation","Locations"],"status":"ok","replaced_by":[],"games":[{"game":"ofp","name":"Operation Flashpoint","version":"1.00"},{"game":"ofpe","name":"Operation Flashpoint: Elite","version":"1.00"},{"game":"arma1","name":"Armed Assault","version":"1.00"},{"game":"arma2","name":"Arma 2","version":"1.00"},{"game":"arma2oa","name":"Arma 2: Operation Arrowhead","version":"1.50"},{"game":"tkoh","name":"Take On Helicopters","version":"1.00"},{"game":"arma3","name":"Arma 3","version":"0.50"}],"since":{"game":"ofp","name":"Operation Flashpoint","version":"1.00"},"arma3_since":"0.50","branch":null,"locality":{"argument":"global","effect":null,"server_exec":false},"exec":null,"description":"Returns the direction an object or a location is facing (differs from getDir in that this also works with locations).","syntaxes":[{"syntax":"direction object","since":null,"effect":null,"exec":null,"params":[{"name":"object","type":"Object or Location","optional":false,"default":null,"description":null,"types":["Object","Location"],"since":null,"text":"object: Object or Location"}],"returns":{"type":"Number in range 0..360","types":["Number"],"description":"Direction in degrees","text":"Number in range 0..360 - Direction in degrees"},"form":"unary","operator":null,"left":null,"right":{"text":"object","types":["Object","Location"]}}],"examples":[{"text":"```sqf\nplayer setDir 90;\n_d = direction player;//returns 90\n```","code":["player setDir 90;\n_d = direction player;//returns 90"]}],"multiplayer":null,"problems":null,"aliases":[],"see_also":["getDir","getDirVisual","setDir","setDirection"],"notes":[],"categories":["ArmA: Armed Assault: Scripting Commands","Arma 2: Operation Arrowhead: Scripting Commands","Arma 2: Scripting Commands","Arma 3: Scripting Commands","Command Group: Locations","Command Group: Object Manipulation","Introduced with Operation Flashpoint version 1.00","Operation Flashpoint: Elite: Scripting Commands","Operation Flashpoint: New Scripting Commands","Operation Flashpoint: Scripting Commands","Scripting Commands","Take On Helicopters: Scripting Commands"]}