OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Tyger on 19 May 2003, 16:24:27
-
:-\
When I try to switch targets on a cutscene, the computer won't switch. Does anyone know why?
The script _cam camsettarget UNITNAME doesn't work.
Please help!
???
-
The _cam camsettarget doesn't commit changes. You'll need theese lines in order to do it.
_cam setcampos xxx
_cam camsettarget xxx
_cam camsetfov 0.7
_cam camcommit YourTime
Does it work now?
-
Hi :)
Here, try this... ;)
All you got to do is change the 'fade in' text to whatever you want and TARGET 1 and TARGET 2 to your units names.
You can copy 'n' paste the whole thing straight to notepad, call it whatever.sqs, whack it in the mission file and away you go!! :D
;----------------------------------------------------------------------
;Fades in with text where 4 is length of black in time
titlecut ["YOUR TEXT HERE", "black in", 4]
;Creates the cam, leave these co-ordinates as they are
_cam = "camera" camcreate [0,0,0]
_cam cameraeffect ["internal", "back"]
;Cam target 1
_cam camsettarget TARGET 1
;Cam position, set the pos using x, y, z co-ordinates
_cam camsetrelpos [ 1, 3, 1.7]
;Length of time to get to target 1, 0 will start on target straight away
_cam camcommit 0
;Length of time on target 1
@camcommitted _cam
~10
;--Cam 2--
;Cam target 2
_cam camsettarget TARGET 2
;Cam 2 position
_cam camsetrelpos [ 1, 3, 1.7]
;Length of time to get from target 1 to target 2
_cam camcommit 4
;Length of time on target 2
@camcommitted _cam
~10
;Destroys the cam
_cam cameraeffect ["terminate", "back"]
camdestroy _cam
;-----------------------------------------------------------------------
All you do now is set your trigger to activate the cutscene script with [] exec "whatever.sqs" in the 'On activation' field.
You can also add more targets, just delete the part that destroys the cam, copy and paste --Cam 2-- and adjust accordingly, not forgetting to replace the cam destroy part at the end of course! ;)
Happy editing! ;D