Funkman 10 Posted June 25, 2011 Hello, I have a camera that activates when the victory conditions are met. The camera works, however, it does not end the mission after that, just stays on the last shot forever. What am I doing wrong? showCinemaBorder false;//creating the camera PlayMusic "track0"; _cam = "camera" CamCreate [6738.02,6255.82,31.59]; _cam cameraeffect ["external", "back"]; _cam camsettarget [-63190.72,6969.99,-71442.48]; _cam camSetFOV 0.700; _cam camcommit 0; _cam camSetPos [6377.06,6259.50,31.59]; _cam camSetTarget [5169.13,104098.55,-20594.54]; _cam camSetFOV 0.700; _cam camCommit 8; Sleep 3.999; titleText ["Well done, the airfield is ours!", "PLAIN"]; Sleep 4; _cam camSetPos [5637.33,6246.60,21.66]; _cam camSetTarget [105520.34,5282.50,-5030.01]; _cam camSetFOV 0.700; _cam camCommit 8; Sleep 6.99; _camera cameraeffect ["terminate","back"] camdestroy _camera end1=true; exit; Share this post Link to post Share on other sites
Coffeecat 10 Posted June 25, 2011 sleep is a command for sqf code, while "~30" for example would be right in your sqs intro;-) Share this post Link to post Share on other sites
Funkman 10 Posted June 25, 2011 This is an .sqf file...So sleep should be ok yeah? ---------- Post added at 08:28 AM ---------- Previous post was at 08:28 AM ---------- The sleep commands work ok, its the last bit end1=true and exit that dont seem to work. Share this post Link to post Share on other sites
Coffeecat 10 Posted June 25, 2011 forgot ";" in the 2 lines before end...? Share this post Link to post Share on other sites
Funkman 10 Posted June 25, 2011 Duh! Oh yeah! :P ---------- Post added at 08:54 AM ---------- Previous post was at 08:53 AM ---------- Ok I fixed that up, but it still doesnt end! Share this post Link to post Share on other sites
Coffeecat 10 Posted June 25, 2011 ah..if its sqf u need to use this waitUntil{camCommitted _camera}; instead of camCommit which is SQS. Share this post Link to post Share on other sites
Funkman 10 Posted June 25, 2011 No camCommit works fine, I use it in all my cam scripts which are sqf and Ive never had a problem.. ---------- Post added at 10:02 AM ---------- Previous post was at 09:42 AM ---------- I turned show script errors on, and it pointed me to the fact that I had _camera, rather than _cam in the last few lines. The camera now terminates and goes back to the player, but I want the whole mission to end, not just the camera. ---------- Post added at 10:04 AM ---------- Previous post was at 10:02 AM ---------- Ok, I looked up the comref, and the correct script is this: endMission "END1"; Share this post Link to post Share on other sites
CarlGustaffa 4 Posted June 25, 2011 Have you tried forceEnd? Share this post Link to post Share on other sites
Funkman 10 Posted June 25, 2011 No I havnt tried force end, but endMission "END1" is working fine thanks anyway. Share this post Link to post Share on other sites