{"name":"setFormDir","operator":null,"title":"setFormDir","type":"command","url":"https://community.bistudio.com/wiki/setFormDir","revid":369299,"updated":"2024-09-03T18:42:52Z","groups":["Groups"],"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":"local","effect":"global","server_exec":false},"exec":null,"description":"Sets group formation heading. Accepted heading range is 0 to 360. Formation is facing this direction unless enemy is seen. When group is moving, this value is overridden by movement direction. If the new direction is noticeably different from the old direction (approx +/- 15 degrees), units will change positions changing formationDirection.","syntaxes":[{"syntax":"group setFormDir heading","since":null,"effect":null,"exec":null,"params":[{"name":"group","type":"Object or Group","optional":false,"default":null,"description":null,"types":["Object","Group"],"since":null,"text":"group: Object or Group"},{"name":"heading","type":"Number","optional":false,"default":null,"description":null,"types":["Number"],"since":null,"text":"heading: Number"}],"returns":{"type":"Nothing","types":["Nothing"],"description":null,"text":"Nothing"},"form":"binary","operator":null,"left":{"text":"group","types":["Object","Group"]},"right":{"text":"heading","types":["Number"]}}],"examples":[{"text":"```sqf\n_group1 setFormDir 180;\n```","code":["_group1 setFormDir 180;"]},{"text":"```sqf\n_unit1 setFormDir random 360;\n```","code":["_unit1 setFormDir random 360;"]},{"text":"```sqf\n//center the main turret\n(group BIS_Crew1) setFormDir (getDir BIS_Armor);\n```","code":["//center the main turret\n(group BIS_Crew1) setFormDir (getDir BIS_Armor);"]}],"multiplayer":null,"problems":null,"aliases":[],"see_also":["setDir","setVectorDir","setVectorDirAndUp","resetSubgroupDirection","formation","formationLeader","formationMembers","formationTask","formationDirection","formationPosition"],"notes":[],"categories":["ArmA: Armed Assault: Scripting Commands","Arma 2: Operation Arrowhead: Scripting Commands","Arma 2: Scripting Commands","Arma 3: Scripting Commands","Command Group: Groups","Introduced with Operation Flashpoint version 1.00","Operation Flashpoint: Elite: Scripting Commands","Operation Flashpoint: New Scripting Commands","Operation Flashpoint: Scripting Commands","Scripting Commands","Scripting Commands: Global Effect","Take On Helicopters: Scripting Commands"]}