Jump to content
🛡️FORUMS ARE IN READ-ONLY MODE Read more... ×
Sign in to follow this  
Devil Dogs SF

Camera.sqs Commands

Recommended Posts

I am working on an intro, and for the most part I understand it, click and then copy paste the code into intro.sqs, but how would I make the Camera look at a certain unit, such as a Helicopter?

Also, is there a way to set the ammount of time it'll stay on the camera position before going to next position? I want the first scene to track a helicopter for about 10-15 seconds before moving to the next position.

Share this post


Link to post
Share on other sites

If i remember right....

Name the Helicopter in your mission Helicopter.

If you like to track a moving target then you need to refresh the camera position every time.

In this example we will track the target ( Helicopter ) for 15 seconds.

Then the script will jump to "#2".

#1
_camera camSetTarget Helicopter
_camera camCommit 0

~0.001

if (_time > 15) then {goto "2"};

goto "1"

#2

Well i haven't made a lot with it but as far as i can remember this was how i made it.

If you like to simply switch the camera position to a specific object without tracking it use:

_camera camSetTarget Helicopter
_camera camCommit 0

~15

Here we will set the camera to the helicopter and wait for 15 seconds bevore continue.

Share this post


Link to post
Share on other sites

Thanks, I'll give this a whirl.

---------- Post added at 07:27 PM ---------- Previous post was at 06:06 PM ----------

My intro isn't working at all, so much for apparently having understood it. What is wrong with it?

I have tried both a trigger saying "this exec "intro.sqs";, this init of the unit using the camera changed to "this exec "intro.sqs";, and even putting "exec "intro.sqs"; in the init.sqf, but it doesn't work, it just shows the back of the unit I used "this exec "camera.sqs"; on and it doesn't play the scene.

#1

{_x setVariable ["BIS_noCoreConversations", true]; _x allowFleeing 0} forEach allUnits;

// --- Info text

if (time < 10) then

{

titleCut ["", "BLACK FADED", 999];

[] Spawn {

waitUntil{!(isNil "BIS_fnc_init")};

// Info text

[str("Wardak, Afghanistan") , str(date select 1) + "." + str(date select 2) + "." + str(date select 0), str("2329 Hours")] spawn BIS_fnc_infoText;

sleep 3;

"dynamicBlur" ppEffectEnable true;

"dynamicBlur" ppEffectAdjust [6];

"dynamicBlur" ppEffectCommit 0;

"dynamicBlur" ppEffectAdjust [0.0];

"dynamicBlur" ppEffectCommit 7;

titleCut ["", "BLACK IN", 5]

};

};

#2

;=== 19:02:20

_camera = "camera" camCreate [0,0,0]

_camera camPrepareTarget [-8909.24,107774.16,73.48]

_camera camPreparePos [3647.22,8567.33,5.54]

_camera camPrepareFOV 0.700

_camera camCommitPrepared 0

@camCommitted _camera

_camera cameraEffect ["internal","back"]

_showcinemaborder true

~7

#3

;=== 19:02:45

_camera = "camera" camCreate [0,0,0]

_camera camPrepareTarget [-40764.02,94404.27,25839.53]

_camera camPreparePos [3656.33,8581.42,0.89]

_camera camPrepareFOV 0.700

_camera camCommitPrepared 0

@camCommitted _camera

_camera cameraEffect ["internal","back"]

_showcinemaborder true

~5

#4

;=== 19:07:16

_camera = "camera" camCreate [0,0,0]

_camera camPrepareTarget [-93682.05,32406.31,-304.64]

_camera camPreparePos [3423.26,8522.58,1.67]

_camera camPrepareFOV 0.700

_camera camCommitPrepared 0

@camCommitted _camera

_camera cameraEffect ["internal","back"]

_showcinemaborder true

~8

#5

_camera cameraEffect ["Terminate","back"]

_camDestroy _cam

~1

exit

Endmission "End1

Share this post


Link to post
Share on other sites

You are mixing .sqs and .sqf this can not work.

waitUntil == .sqf

@ == .sqs

Also you can not use:

if (myCondition) then
{
      Do this.
};

It has to be one line or a jump to "#" lable.

if (myCondition) then {Do this};

or

if (myCondition) then {goto "1"} else {goto "2"};

#1

hint "1"

#2

hint "2"

Another wrong ( mixed ) command:

sleep == .sqf

~ == .sqs

Share this post


Link to post
Share on other sites
Sign in to follow this  

×