OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Storm-Dk on 02 Nov 2003, 11:15:00
-
Hi guys!
Can one of you guys tell how the basic cam.sqs is working.
_camera camSetTarget [-59042.83,80126.35,69.15]
_camera camSetPos [5301.85,3577.27,2.02]
_camera camSetFOV 0.700
_camera camCommit 0
@camCommitted _camera
I hope you guys can tell me..
-
Here's a simple example
_cam = "camera" camcreate [3216.01,3603.55,14.62]
_cam cameraeffect ["internal", "back"]
_cam camSetTarget [-51544.96,83057.15,-27502.45]
_cam camSetPos [2565.25,3636.74,17.68]
_cam camSetFOV 0.771
_cam camCommit 0
@camCommitted _cam
~2
_cam camSetTarget [-51544.96,83057.15,-27502.44]
_cam camSetPos [2552.67,3659.52,8.56]
_cam camSetFOV 0.771
_cam camCommit 3
@camCommitted _cam
~1
you have to create a camera before anything else ;D (the first two lines of code)
-
thanks its good. but there is somthing i want to know..
_cam camSetTarget [-51544.96,83057.15,-27502.45]
_cam camSetPos [2565.25,3636.74,17.68]
this to 'commands'.. How do you know what to wride in them??
-
You should check out the camscripting tutorials by snYpir and Messiah that can be found here: http://www.ofpec.com/editors/browse.php?category=1_3
basically the numbers in those lines refer to the exact coordinates of a spot on whatever island your cam script is going to be run on ...
you can just as easily name any unit/object and refer to that name in your camera script. which would look like this:
_cam camSetTarget unit/object name
_cam camsetrelpos [x,y,z]
camsetrelpos sets the x,y,z position of the camera relative to the object that the camera has been pointed at in the camsettarget command.
you should run through those two tutorials and you should have a fairly good grasp of camera scripting afterwards
:cheers: