Home   Help Search Login Register  

Author Topic: Cam script won't end  (Read 1066 times)

0 Members and 1 Guest are viewing this topic.

El Savior

  • Guest
Cam script won't end
« on: 16 Jul 2003, 13:25:33 »
Hi! I'm a newbie with scripts so forgive me  ;)

This is my first working cam-script. It's working fine until the end. Somewhy cam is operating and I can't exit the script and start playing. Last camshould 'film' 15 seconds after script end.

Here's the script:

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

enableradio false

titlecut [" ", "black in", 2]

;=== pasit pysähtyy, lastia puretaan
_camera camSetTarget [-89600.61,-23142.36,-2995.03]
_camera camSetPos [6051.34,5861.98,1.87]
_camera camSetFOV 0.700
_camera camCommit 0
@camCommitted _camera
~3

;=== vasemmalta puolelta lastinpurku
_camera camSetTarget jaakari1
_camera camSetPos [6007.27,5822.73,2.00]
_camera camSetFOV 0.700
_camera camCommit 0
~15

_cam cameraeffect ["terminate", "back"]
camdestroy _cam

enableradio true

; exit the script
exit


El Savior

O Neil

  • Guest
Re:Cam script won't end
« Reply #1 on: 16 Jul 2003, 13:42:04 »
Damn, I wouldn't have a clue...this is usually how I do it:

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

_cam camsettarget man1
_cam camsetrelpos [0,0,0]
_cam camcommit 0
@camcommitted _cam
~0

titlecut [" ","BLACK IN",2]
~0

_cam camsetrelpos [0,0,0]
_cam camcommit 0
@camcommitted _cam
~0

titlecut [" ","BLACK OUT",2]
~0

_cam cameraeffect ["terminate", "back"]
camdestroy _cam

exit

That's the basic system I use...not to familiar with your but try doing something like that.

Sorry, probably didn't help much eh ;)

O'Neil

El Savior

  • Guest
Re:Cam script won't end
« Reply #2 on: 16 Jul 2003, 13:50:19 »
Noup, didn't help...

In the end, your script fade to black, but I still can't start playing.

Offline Blanco

  • Former Staff
  • ****
Re:Cam script won't end
« Reply #3 on: 16 Jul 2003, 17:35:28 »
you can play , but the screen stays black when the cam"s destroyed.

Try this :
Quote
; create camera
_camera = "camera" camcreate [0,0,0]
_camera cameraeffect ["internal", "back"]

enableradio false

titlecut [" ", "black in", 2]

;=== pasit pysähtyy, lastia puretaan
_camera camSetTarget [-89600.61,-23142.36,-2995.03]
_camera camSetPos [6051.34,5861.98,1.87]
_camera camSetFOV 0.700
_camera camCommit 0
@camCommitted _camera
~3

;=== vasemmalta puolelta lastinpurku
_camera camSetTarget jaakari1
_camera camSetPos [6007.27,5822.73,2.00]
_camera camSetFOV 0.700
_camera camCommit 0
~15
Titlecut [" ","BLACK OUT",2]
~2
Titlecut [" ","BLACK IN",2]
_camera cameraeffect ["terminate", "back"]
camdestroy _camera

enableradio true

; exit the script
exit

The Titlecut [" ","BLACK IN",2] at the end does the job. Dunno if the timing is good, experiment with ~delay values if not














« Last Edit: 16 Jul 2003, 17:47:56 by Blanco »
Search or search or search before you ask.

max_killer_payne

  • Guest
Re:Cam script won't end
« Reply #4 on: 16 Jul 2003, 17:44:38 »
El Savior its a real simple problem. I'll show you what the problem is

quote from your script

Quote
_camera = "camera" camcreate [0,0,0]

This means you have given your camera the id of _camera. So the camera to do its function, when called upon MUST be called _camera.

Quote
_camera camSetTarget jaakari1

See? If you put _cam camSetTarget jaakari1 it wouldnt work because your camera is not identifiyed as _cam.

So to the solution:


Quote
_cam cameraeffect ["terminate", "back"]
camdestroy _cam

so you destroy the camera like this. But your camera name ISNT _cam its _camera. So put in

Code: [Select]
_camera cameraeffect ["terminate", "back"]
camdestroy _camera

and it shud work


El Savior

  • Guest
Re:Cam script won't end
« Reply #5 on: 16 Jul 2003, 18:36:37 »
Douh! Of course you was right... Problem solved! Thanks guys for your help. And here's a tip to everyone: Don't do scripting in early morning hours (4 am)  ;D


Greets,

El Savior

max_killer_payne

  • Guest
Re:Cam script won't end
« Reply #6 on: 16 Jul 2003, 18:38:44 »
No probs  ;D

Now press the solve button dammit!!! ;D