OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: El Savior 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
-
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
-
Noup, didn't help...
In the end, your script fade to black, but I still can't start playing.
-
you can play , but the screen stays black when the cam"s destroyed.
Try this :
; 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
-
El Savior its a real simple problem. I'll show you what the problem is
quote from your script
_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.
_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:
_cam cameraeffect ["terminate", "back"]
camdestroy _cam
so you destroy the camera like this. But your camera name ISNT _cam its _camera. So put in
_camera cameraeffect ["terminate", "back"]
camdestroy _camera
and it shud work
-
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
-
No probs ;D
Now press the solve button dammit!!! ;D