Jump to content
Sign in to follow this  
jakerod

Camera not switching scenes & Loops

Recommended Posts

I am having trouble with my camera going from one scene to the next. It stops at the end of Scene 1 but doesn't move to Scene 2. This is the first time I've done this with .sqf. Previously (mostly in OFP) I had done this all with .sqs.

My second question is how to loop the camera. This is for an island intro and so looping it is preferred. I haven't learned how to do that in .sqf yet only .sqs.

titlecut [" ","BLACK IN",2];
_camera = "camera" camcreate [0,0,0];
_camera cameraeffect ["internal","back"];
0 fademusic 0;
5 fademusic .5;
playmusic "Track26_Organ_Works";


showcinemaborder false;

///Scene 1
_camera camPrepareTarget [88067.95,-45297.54,10.87];
_camera camPreparePos [2585.83,6594.72,2.06];
_camera camPrepareFOV 0.700;
_camera camCommitPrepared 0;
waitUntil {camCommitted _camera};

_camera camPrepareTarget [94285.21,-27485.55,-20835.62];
_camera camPreparePos [2589.09,6518.65,26.97];
_camera camPrepareFOV 0.700;
_camera camCommitPrepared 2;
waitUntil {camCommitted _camera};

///Scene 2
_camera camPrepareTarget '31dfa000# 475: a_office02.p3d';
_camera camPreparePos [2838.33,6428.08,11.99];
_camera camPrepareFOV 0.672;
_camera camCommitPrepared 0;
waitUntil {camCommitted _camera};

_camera camPrepareTarget '31dfa000# 475: a_office02.p3d';
_camera camPreparePos [2837.06,6492.74,14.06];
_camera camPrepareFOV 0.672;
_camera camCommitPrepared 10;
waitUntil {camCommitted _camera};

_camera camPrepareTarget [-89297.60,29895.08,-30276.92];
_camera camPreparePos [3029.61,6298.15,21.20];
_camera camPrepareFOV 0.672;
_camera camCommitPrepared 0;
waitUntil {camCommitted _camera};

_camera camPrepareTarget [-79731.84,-40692.21,-30305.12];
_camera camPreparePos [2993.81,6593.07,33.97];
_camera camPrepareFOV 0.672;
_camera camCommitPrepared 20;
waitUntil {camCommitted _camera};

_camera camPrepareTarget [-45861.21,88160.40,-26955.32];
_camera camPreparePos [6363.82,7261.85,12.47];
_camera camPrepareFOV 0.700;
_camera camCommitPrepared 0;
waitUntil {camCommitted _camera};

_camera camPrepareTarget [76356.81,73282.02,-26955.36];
_camera camPreparePos [6248.22,7275.85,12.23];
_camera camPrepareFOV 0.700;
_camera camCommitPrepared 10;
waitUntil {camCommitted _camera};

_camera camPrepareTarget [8257.92,7696.92,0.00];
_camera camPreparePos [7496.98,6461.63,23.24];
_camera camPrepareFOV 0.509;
_camera camCommitPrepared 0;
waitUntil {camCommitted _camera};

_camera camPrepareTarget [8257.92,7696.92,0.00];
_camera camPreparePos [8420.64,6867.63,42.01];
_camera camPrepareFOV 0.509;
_camera camCommitPrepared 0;
waitUntil {camCommitted _camera};

_camera camPrepareTarget [-77421.71,53203.47,-23146.11];
_camera camPreparePos [8466.82,7538.07,32.99];
_camera camPrepareFOV 0.700;
_camera camCommitPrepared 0;
waitUntil {camCommitted _camera};

_camera camPrepareTarget [91591.85,58059.35,-23145.93];
_camera camPreparePos [8466.82,7538.07,32.99];
_camera camPrepareFOV 0.700;
_camera camCommitPrepared 10;
waitUntil {camCommitted _camera};

titlecut [" ","BLACK OUT",2]

_camera camPrepareTarget [91591.85,58059.35,-23145.93];
_camera camPreparePos [8466.82,7538.07,32.99];
_camera camPrepareFOV 0.700;
_camera camCommitPrepared 02;

Share this post


Link to post
Share on other sites

Hi,

What's this?

_camera camPrepareTarget '31dfa000# 475: a_office02.p3d';

_neo_

Share this post


Link to post
Share on other sites
Hi,

What's this?

_camera camPrepareTarget '31dfa000# 475: a_office02.p3d';

_neo_

It's targeting a building. I did it by looking at the building and hitting / on the numpad. It locks onto a target. More here: Camera.sqs (Biki)

Share this post


Link to post
Share on other sites
It's targeting a building. I did it by looking at the building and hitting / on the numpad. It locks onto a target. More here: Camera.sqs (Biki)

Copy, but I guess that's your problem. The lack of a good reference to the object.

But not just that, check the '', it should be "";

_neo_

Share this post


Link to post
Share on other sites
Copy, but I guess that's your problem. The lack of a good reference to the object.

But not just that, check the '', it should be "";

_neo_

Okay. I'll take a look at that when I get home tonight. Thanks.

Share this post


Link to post
Share on other sites

Thank you it worked. The target was buggy. I guess I just can't trust camera.sqs like I used to. My apologies for not checking on that too. I should've tried switching things around a bit to see if that might of been the issue. My brain is fried from all my island troubles though I guess.

Thanks again.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×