Home   Help Search Login Register  

Author Topic: Problem in Camera scripting  (Read 610 times)

0 Members and 1 Guest are viewing this topic.

PJK

  • Guest
Problem in Camera scripting
« on: 12 Jan 2003, 17:18:32 »
Hello

I have done some camera scripting, but when intro/mission is launched, it gives error message:

"_camera camSetTarget |#|'T72": Error Invalid number in expression

In  _camera camSetTarget I have target as T72 (or any name in unit) so line is:

_camera camSetTarget 'T72'

Same problem is with original name also (when using units original name...) OFP version is 1.90.

I appreciate all answers

PJK

Offline KTottE

  • Former Staff
  • ****
Re:Problem in Camera scripting
« Reply #1 on: 12 Jan 2003, 18:58:27 »
_camera camSetTarget T72

Is the correct line, no ' ' around the target name.
"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!'"

PJK

  • Guest
Re:Problem in Camera scripting
« Reply #2 on: 12 Jan 2003, 19:27:31 »
Thank you KTottE, that's it (Is this between different versions, because camera.sqs gives ' ' markers itself?).

But now it qives second one. It says:

"_camera = cameraeffect |#|["internal", "back"]: Error Unknown operator

Line is:

_camera = cameraeffect ["internal", "back"]

It seems that everytime when I solve one problem, second one appears.
And all script is done by tutorials and camera.sqs itself...

PJK

Offline KTottE

  • Former Staff
  • ****
Re:Problem in Camera scripting
« Reply #3 on: 12 Jan 2003, 20:56:11 »
Right, I don't see any errors in that second line. Weird.
Try rewriting the whole line and see if it works better.
"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!'"

PJK

  • Guest
Re:Problem in Camera scripting
« Reply #4 on: 12 Jan 2003, 21:48:42 »
I tried to regenerate line, and whole script, but no results yet.
I also create few new intros but always with same error message.
Next one is example of one script I just tried:

_camera = "camera" camcreate [0,0,0]
_camera = cameraeffect ["internal", "back"]
;=== 21:39:04
_camera camSetTarget [14163.48,103877.97,-8839.14]
_camera camSetPos [3030.86,4895.51,2.94]
_camera camSetFOV 0.700
_camera camCommit 0
@camCommitted _camera
~10

I have also test different situations, like "external", "top" etc.

Thank you, KTottE, for your efforts

PJK

Offline KTottE

  • Former Staff
  • ****
Re:Problem in Camera scripting
« Reply #5 on: 12 Jan 2003, 22:14:21 »

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

_camera camSetTarget [14163.48,103877.97,-8839.14]
_camera camSetPos [3030.86,4895.51,2.94]
_camera camSetFOV 0.700
_camera camCommit 0
~10


Copy paste that, and see if it works.
"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!'"

PJK

  • Guest
Re:Problem in Camera scripting
« Reply #6 on: 12 Jan 2003, 22:31:59 »
Now it hit right where it should be...
So it was that "=". For some reason I have put that = there, even if I checked that many times...

Thank you KTottE

PJK

PJK

  • Guest
Re:Problem in Camera scripting
« Reply #7 on: 12 Jan 2003, 22:52:01 »
This correction to my own post...
I ment, that I didn't change anything else than take = away  between camera and cameraeffect. So it is a bit different from KTottE's suggestion, but seems to work...