Home   Help Search Login Register  

Author Topic: Basic camera question  (Read 724 times)

0 Members and 1 Guest are viewing this topic.

Jabani

  • Guest
Basic camera question
« on: 12 Dec 2002, 21:34:34 »
I was following this scripting tutorial, and got a "generic error expression" for this line:

_cam = "camera" CamCreate [_camx,_camy+5,_camz+1]

What gives? (If ya need the rest of the script, plz ask).

Offline KTottE

  • Former Staff
  • ****
Re:Basic camera question
« Reply #1 on: 12 Dec 2002, 23:17:27 »
Well, as the camera isn't created yet, it doesn't have any coordinates, and that means you can't increment those coordinates with anything. 'Cause they don't exist.

Whenever you are creating a camera, create it at [0,0,0] then move it into the right place.

And to my knowledge, _camx/y/z will never work, as they aren't proper commands. Have to test that though.

For now, I suggest doing something like this:

_cam = "camera" camCreate [0,0,0]
_cam cameraEffect ["internal","back"]

_cam camSetTarget X
_cam camSetPos [#,#,#]


X = the unit/object you want to target
#,#,# = X,Y,Z coords. You can get exact coordinates by using camera.sqs (explained in the Editors Depot very well, look for Messiah's camera.sqs tutorial)




"Life is not a journey to the grave with the intention of arriving safely in a pretty and well preserved body, but rather to skid in broadside, thoroughly used up, totally worn out, and loudly proclaiming 'WOW What a Ride!'"