Home   Help Search Login Register  

Author Topic: Camera.sqs Tutorial  (Read 12149 times)

0 Members and 1 Guest are viewing this topic.

Offline Messiah

  • Honourary OFPEC Patron & Drinking Buddy of Wolfsbane
  • Honoured Contributor
  • ***
  • OFPEC Veteran
    • Project UK Forces
Camera.sqs Tutorial
« on: 25 Aug 2002, 13:22:25 »


[attachment deleted by admin]
« Last Edit: 27 Aug 2002, 01:05:32 by Messiah »
Proud Member of the Volunteer Commando Battalion

Jakerod

  • Guest
Re:Camera.sqs Tutorial
« Reply #1 on: 26 Aug 2002, 20:40:21 »
Do i have to name it camera.sqs?
I saved it as cam.sqs and put it with my mission and imported the mission into single player but it always says that its not found.

Offline Garritos

  • Members
  • *
  • life is like a box of donuts...
Re:Camera.sqs Tutorial
« Reply #2 on: 26 Aug 2002, 20:58:58 »
you dont accually need a script, just type this this exec "camera.sqs" in the players init field.  its built into the game so no external script is needed  :wow:

cheers to Messiah for writing this tute, it really cuts down on the time needed and fustration factor of camera scripting.
Lead Mission Designer
1982:Flashpoint in the Falklands
http://www.flashpoint1982.co.uk

Offline Messiah

  • Honourary OFPEC Patron & Drinking Buddy of Wolfsbane
  • Honoured Contributor
  • ***
  • OFPEC Veteran
    • Project UK Forces
Re:Camera.sqs Tutorial
« Reply #3 on: 26 Aug 2002, 21:00:07 »
nooooo nooooo....

camera.sqs is an inbuilt script - i.e you dont need to make it, its there in the game...

as for what you name the script you make, thats up to you, it can be called anything.

but remember, for any other script, you execute it like this:

[] exec "scriptname.sqs"

the camera.sqs uses 'this' so it can start somewhere.

hope that helps.

:thumbsup:
Proud Member of the Volunteer Commando Battalion

mikeb

  • Guest
Re:Camera.sqs Tutorial
« Reply #4 on: 26 Aug 2002, 21:02:08 »
Yeah, thanks from me too.  I've already written loads of cutscenes without this and it took me AGES.  I usually use targeted shots to get around the difficulty of making static scripted cameras (time-consuming) and this helps so much!!

Can't believe I didn't know about it!

Thanks again

seanver

  • Guest
Re:Camera.sqs Tutorial
« Reply #5 on: 26 Aug 2002, 21:03:40 »
Quote
the camera.sqs uses 'this' so it can start somewhere.

Also you can put the name of the unit you want the camera to start at, instead of this. Also you can start the camera script from a trigger, so if you activate it using for example Alpha channel, you can let some events take plase before using the camera to see the positions of the units after that events.
« Last Edit: 26 Aug 2002, 21:08:40 by SeAnVeR »

Jakerod

  • Guest
Re:Camera.sqs Tutorial
« Reply #6 on: 26 Aug 2002, 21:05:39 »
Whoops i did....this exec "cam.sqs" instead of [] exec "cam.sqs"

Thank you...and where is snypers(sp?) tutorial?

Offline Messiah

  • Honourary OFPEC Patron & Drinking Buddy of Wolfsbane
  • Honoured Contributor
  • ***
  • OFPEC Veteran
    • Project UK Forces
Re:Camera.sqs Tutorial
« Reply #7 on: 26 Aug 2002, 21:09:08 »
well at the moment the tutorial page is down (im working on that section of ofpec - editors depot) but as soon as it is up this tutorial will be moved there and then this thread deleted - basically as soon as the site is up (the main bit) then the tutes section should be  - and then look for basic camera scripting tutorial - i printed it out instead of copying, so i cant attach a copy...

if some1 else has a copy they could attach, it would be very handy..

cheers

:thumbsup:
Proud Member of the Volunteer Commando Battalion

Jakerod

  • Guest
Re:Camera.sqs Tutorial
« Reply #8 on: 26 Aug 2002, 22:03:02 »
okay this is what i did....i did the whole camera.sqs thing. I saved the notepad as cam.sqs Then i went into my level and put a trigger saying Civilian present [] exec "cam.sqs"... But it doesnt work. Is there somethign else i need to do?

seanver

  • Guest
Re:Camera.sqs Tutorial
« Reply #9 on: 26 Aug 2002, 22:07:45 »
Hmmm you are using the control key to copy the camera's positions to cam.sqs, aren't you? Well, you need to create, at the beginning of the file, the camera and the type of camera:

_camera = "camera" camcreate [0,0,0]
_camera cameraeffect ["internal", "back"]
« Last Edit: 26 Aug 2002, 22:08:58 by SeAnVeR »

mikeb

  • Guest
Re:Camera.sqs Tutorial
« Reply #10 on: 26 Aug 2002, 22:09:29 »
when you saved it as cam.sqs did you also make sure that you'd selected "All types" when it asks what file to save it as.  Also, make sure you put the sqs file into the mission folder

mikeb

  • Guest
Re:Camera.sqs Tutorial
« Reply #11 on: 26 Aug 2002, 22:10:23 »
.... you don't have to export it to single missions either. it should work in the preview in the mission editor anyway.

Jakerod

  • Guest
Re:Camera.sqs Tutorial
« Reply #12 on: 26 Aug 2002, 22:14:32 »
IT keeps saying not found...Is it suppose to look like the notepad still or something else? and this is my script thingy im sure there will be somethign wrong with it.

_camera = "camera" camcreate [0,0,0]
_camera cameraeffect ["internal", "back"]

;=== 13:48:56
_camera camSetTarget [61702.32,82638.53,-25582.18]
_camera camSetPos [9427.36,1349.21,51.60]
_camera camSetFOV 0.700
_camera camCommit 0
@camCommitted _camera
;=== 13:49:34
_camera camSetTarget [78906.09,71920.44,-13767.65]
_camera camSetPos [9413.33,1358.22,2.00]
_camera camSetFOV 0.700
_camera camCommit 0
@camCommitted _camera
;=== 13:49:34
_camera camSetTarget [78906.09,71920.44,-13767.65]
_camera camSetPos [9413.33,1358.22,2.00]
_camera camSetFOV 0.700
_camera camCommit 0
@camCommitted _camera
;=== 13:49:34
_camera camSetTarget [78906.09,71920.44,-13767.65]
_camera camSetPos [9413.33,1358.22,2.00]
_camera camSetFOV 0.700
_camera camCommit 0
@camCommitted _camera

Offline KTottE

  • Former Staff
  • ****
Re:Camera.sqs Tutorial
« Reply #13 on: 26 Aug 2002, 22:50:53 »
I guess Messiah had to be more specific.

camera.sqs is not a tool to create your cutscenes for you. It's a way of finding out the X,Y,Z coords of important places for your camera.

I suggest you wait a while until MkII is launched, and read snYpir's tutorial on camscripting before using camera.sqs
Right now, I don't think you understand what the different commands do, or am I wrong?

For instance, do you know what CamCommit # does?
"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!'"

Offline Messiah

  • Honourary OFPEC Patron & Drinking Buddy of Wolfsbane
  • Honoured Contributor
  • ***
  • OFPEC Veteran
    • Project UK Forces
Re:Camera.sqs Tutorial
« Reply #14 on: 26 Aug 2002, 22:51:57 »
1. Make sure its saved into your mission folder (the one where u saved the mission of course)

2. If thats your script then it wont work - you havnt set any time for the camera to 'look' at the posistions:

like this:

;=== 13:48:56
_camera camSetTarget [61702.32,82638.53,-25582.18]
_camera camSetPos [9427.36,1349.21,51.60]
_camera camSetFOV 0.700
_camera camCommit 0
@camCommitted _camera

~10  <---- makes the camera look at the above shot for 10s

;=== 13:49:34
_camera camSetTarget [78906.09,71920.44,-13767.65]
_camera camSetPos [9413.33,1358.22,2.00]
_camera camSetFOV 0.700
_camera camCommit 0
@camCommitted _camera

3. Make sure you have created the camera

thats all i can think of
Proud Member of the Volunteer Commando Battalion