Home   Help Search Login Register  

Author Topic: Why doesnt my camera.sqs work?  (Read 778 times)

0 Members and 1 Guest are viewing this topic.

Gooner861

  • Guest
Why doesnt my camera.sqs work?
« on: 25 Jul 2003, 18:21:40 »
Ive worked out how 2 work camera.sqs but wen i preview my cutscene it starts off in the sea and the camera just bobs up and down. Why??????

Offline KTottE

  • Former Staff
  • ****
Re:Why doesnt my camera.sqs work?
« Reply #1 on: 25 Jul 2003, 18:36:56 »
What exactly did you put in the init field of your soldier?
"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 Zombie

  • Members
  • *
  • Beware the night, the zombie walks among you
    • USI
Re:Why doesnt my camera.sqs work?
« Reply #2 on: 25 Jul 2003, 21:04:36 »
also you can't name the cutscene "camera.sqs", that is a "hidden" sqs.  I ususlly name mine movie.sqs.  The scene will bob like that if:
1. you made a "hard target" for the camera, like _camera settarget guy1, and then there is no guy1
2.  Your variables don't match, ie:
;this creates the camera
_cam = "camera" camcreate [0,0,0]
_cam cameraeffect ["internal", "back"]
_cam camcommit 0
;this is the first view
;=== 8:37:46
_camera camSetTarget [67425.66,85963.05,27.50]
_camera camSetPos [10220.91,3941.01,8.00]
_camera camCommit 0
@camCommitted _camera
see in the 1st 3 lines it is called _cam and the rest _camera?  Make sure they all match.

These are the 2 most common probs I have had that cause what you described.  Also make sure you are not trying to run "camera.sqs" and "movie.sqs" at the same time

Gooner861

  • Guest
Re:Why doesnt my camera.sqs work?
« Reply #3 on: 26 Jul 2003, 00:01:56 »
I think ur rite, i think i have put _cam at the top and the rest being _camera, ill check 2morrow and get back to u.

Cheers :).

Gooner861

  • Guest
Re:Why doesnt my camera.sqs work?
« Reply #4 on: 26 Jul 2003, 22:42:37 »
Take a look at it:
;=== 13:02:33
_camera = "camera" camcreate [0,0,0]
_camera cameraeffect ["internal", "back"]
_camera camSetTarget [-37510.10,91349.02,-11883.64]
_camera camSetPos [9743.72,3989.46,16.05]
_camera camSetFOV 0.700
_camera camCommit 0
@camCommitted _camera

;=== 13:03:01
_camera camSetTarget [-37510.10,91349.02,-11883.87]
_camera camSetPos [9699.45,4071.29,16.05]
_camera camSetFOV 0.700
_camera camCommit 5
@camCommitted _camera

Its probably really wrong but its my first time at using camera.sqs.

Offline KTottE

  • Former Staff
  • ****
Re:Why doesnt my camera.sqs work?
« Reply #5 on: 26 Jul 2003, 23:37:36 »
Okay, let me walk you through the process of creating a cutscene with camera.sqs.

1) Make a mission
2) Decide what to put in the intro/cutscene
3) Place a player unit in the mission editor and in his init-field you type exactly: [] exec "camera.sqs"
Do not create a script called camera.sqs in the mission folder.
4) Press preview, move the camera around, and when you find a suitable spot you press "CTRL", this will dump the current information into a .txt file in the main OFP directory called clipboard.txt
5) Create the script that will power your intro/cutscene, name it what you want but not camera.sqs.
6) Use the data you collected with camera.sqs in your intro/cutscene script, namely the camera's position and target.
7) Enjoy

If you did any of the above points differently, tell me which and what.
"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!'"

Gooner861

  • Guest
Re:Why doesnt my camera.sqs work?
« Reply #6 on: 27 Jul 2003, 00:03:43 »
1) Correct
2) Correct
3) Instead of [] exec "camera.sqs", i put: this "camera.sqs".
4) I didnt know about clipboard.txt so i pasted into notepad.

So do i have to rename clipboard.txt to a .sqs file which i can then activate in the players init field.

Offline KTottE

  • Former Staff
  • ****
"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:Why doesnt my camera.sqs work?
« Reply #8 on: 27 Jul 2003, 13:14:19 »
exactly: [] exec "camera.sqs"
If you did any of the above points differently, tell me which and what.

sorry kotty fella... its this exec "camera.sqs"

 ;)
« Last Edit: 27 Jul 2003, 13:14:30 by Messiah »
Proud Member of the Volunteer Commando Battalion

Gooner861

  • Guest
Re:Why doesnt my camera.sqs work?
« Reply #9 on: 28 Jul 2003, 20:18:27 »
Cheers, got it all working now. You can make much better cutscenes with camera.sqs.  ;D

Offline Messiah

  • Honourary OFPEC Patron & Drinking Buddy of Wolfsbane
  • Honoured Contributor
  • ***
  • OFPEC Veteran
    • Project UK Forces
Re:Why doesnt my camera.sqs work?
« Reply #10 on: 29 Jul 2003, 11:55:26 »
hence why i wrote the tutorial  ;)
Proud Member of the Volunteer Commando Battalion