Home   Help Search Login Register  

Author Topic: Basic Cam.  (Read 409 times)

0 Members and 1 Guest are viewing this topic.

Storm-Dk

  • Guest
Basic Cam.
« on: 02 Nov 2003, 11:15:00 »
Hi guys!

Can one of you guys tell how the basic cam.sqs is working.
Quote

_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..

Kaliyuga

  • Guest
Re:Basic Cam.
« Reply #1 on: 02 Nov 2003, 17:57:20 »
Here's a simple example

Code: [Select]
_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)
« Last Edit: 02 Nov 2003, 17:57:42 by Kaliyuga »

Storm-Dk

  • Guest
Re:Basic Cam.
« Reply #2 on: 02 Nov 2003, 21:23:22 »
thanks its good. but there is somthing i want to know..
Quote
_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??

Kaliyuga

  • Guest
Re:Basic Cam.
« Reply #3 on: 03 Nov 2003, 00:34:20 »
 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:
« Last Edit: 03 Nov 2003, 00:34:56 by Kaliyuga »