{"name":"camCommit","operator":null,"title":"camCommit","type":"command","url":"https://community.bistudio.com/wiki/camCommit","revid":325309,"updated":"2022-07-10T23:02:07Z","groups":["Camera Control"],"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":"local","server_exec":false},"exec":null,"description":"Smoothly conduct the changes that were assigned to a camera within the given time. If the time is set to zero, the changes are done immediately. For `camPrepareXXX` commands use camCommitPrepared.","syntaxes":[{"syntax":"camera camCommit time","since":null,"effect":null,"exec":null,"params":[{"name":"camera","type":"Object","optional":false,"default":null,"description":"object of type \"camera\"","types":["Object"],"since":null,"text":"camera: Object - object of type \"camera\""},{"name":"time","type":"Number","optional":false,"default":null,"description":"time in seconds during which the changes shall be done","types":["Number"],"since":null,"text":"time: Number - time in seconds during which the changes shall be done"}],"returns":{"type":"Nothing","types":["Nothing"],"description":null,"text":"Nothing"},"form":"binary","operator":null,"left":{"text":"camera","types":["Object"]},"right":{"text":"time","types":["Number"]}}],"examples":[{"text":"SQS Syntax:\n\n```sqs\n; create a camera object\n_cam = \"camera\" camCreate [5600,4800,10]\n_cam camSetTarget player\n_cam cameraEffect [\"internal\", \"BACK\"]\n_cam camCommit 0\n\n; smoothly move the camera to its new position in 6 seconds\n_cam camSetPos [5680,4720,20]\n_cam camCommit 6\n@camCommitted _cam\n\n; proceed\n```","code":["; create a camera object\n_cam = \"camera\" camCreate [5600,4800,10]\n_cam camSetTarget player\n_cam cameraEffect [\"internal\", \"BACK\"]\n_cam camCommit 0\n\n; smoothly move the camera to its new position in 6 seconds\n_cam camSetPos [5680,4720,20]\n_cam camCommit 6\n@camCommitted _cam\n\n; proceed"]},{"text":"SQF Syntax:\n\n```sqf\nprivate \"_cam\";\n\n// create a camera object\n_cam = \"camera\" camCreate [position player select 0, position player select 1, 2];\n_cam camSetTarget player;\n_cam cameraEffect [\"internal\", \"BACK\"];\n_cam camCommit 0;\n\n// smoothly move the camera to its new position in 6 seconds\n_cam camSetPos [position player select 0, (position player select 1) + 10, 20];\n_cam camCommit 6;\nwaitUntil { camCommitted _cam; };\n```","code":["private \"_cam\";\n\n// create a camera object\n_cam = \"camera\" camCreate [position player select 0, position player select 1, 2];\n_cam camSetTarget player;\n_cam cameraEffect [\"internal\", \"BACK\"];\n_cam camCommit 0;\n\n// smoothly move the camera to its new position in 6 seconds\n_cam camSetPos [position player select 0, (position player select 1) + 10, 20];\n_cam camCommit 6;\nwaitUntil { camCommitted _cam; };"]}],"multiplayer":null,"problems":null,"aliases":[],"see_also":["camCommitted","camCommitPrepared"],"notes":[],"categories":["ArmA: Armed Assault: Scripting Commands","Arma 2: Operation Arrowhead: Scripting Commands","Arma 2: Scripting Commands","Arma 3: Scripting Commands","Command Group: Camera Control","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: Local Effect","Take On Helicopters: Scripting Commands"]}