OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Aculaud on 01 Feb 2003, 08:02:55

Title: In game cinematics dont work?
Post by: Aculaud on 01 Feb 2003, 08:02:55
I'm using a small in-game cut scene to end this mission. Everything works except the camera bits. Heres the script i'm using:

titlecut ["","BLACK OUT",4]
~3.8

titlecut ["","BLACK IN",1.5]
_cam camcreate [0,0,0]
_cam cameraeffect ["Internal","Back"]

_cam camsettarget ap1
_cam camsetrelpos [3,3,4]
_cam camcommit 0

_cam camsettarget ap1
_cam camsetrelpos [10,1,6]
_cam camcommit 8

playsound "end"
player sidechat "Poppa Bear. I'm heading back. Over."

~1.5

titletext ["Mission Terminated","PLAIN"]

~3.5

titlecut ["","BLACK OUT",3]

~3

end = TRUE
exit


It has to be CamSetRelPos because theres more than one place the player can end the mission and the camera has to be able to go where the player is.

Thanks in advance,

ME!!
Title: Re:In game cinematics dont work?
Post by: Sui on 01 Feb 2003, 12:31:13
Heya Alucard,

I'm betting your camera is working fine ;)

You're just not letting it pause to take time to watch ap1 there ... try throwing some delays in... eg.

...
_cam camsetrelpos [3,3,4]
_cam camcommit 0
~10
_cam camsettarget ap1
_cam camsetrelpos [10,1,6]
_cam camcommit 8
~8
playsound "end"

So the camera pauses before changing to the next camera position...

hope that helps
Title: Re:In game cinematics dont work?
Post by: Aculaud on 01 Feb 2003, 20:01:21
I think ten seconds is way too much, but that gave me another idea. I'll report back if it works...

:Edit:

Sorry, Sui, didnt work. I put the camcreate bits at the very top, so itd have the delay from the titlecuts blacking out and back in, but its still not working.
Title: Re:In game cinematics dont work?
Post by: KTottE on 01 Feb 2003, 22:52:10
Code: [Select]
titlecut ["","BLACK OUT",4]
~3.8

_cam camcreate [0,0,0]
_cam cameraeffect ["Internal","Back"]

_cam camsettarget ap1
_cam camsetrelpos [3,3,4]
_cam camcommit 0

titlecut ["","BLACK IN",1.5]
~1.5

_cam camsettarget ap1
_cam camsetrelpos [10,1,6]
_cam camcommit 8
@CamCommitted _cam

playsound "end"
player sidechat "Poppa Bear. I'm heading back. Over."
~1.5

titletext ["Mission Terminated","PLAIN"]
~3.5

titlecut ["","BLACK OUT",3]
~3

end = TRUE
exit

Try that instead
Title: Re:In game cinematics dont work?
Post by: Aculaud on 01 Feb 2003, 23:00:07
That one didnt work either. After it blacked out and then blacked in at the begining the script seemed to exit right there. No camera, no side chat, no sounds, no text....
Title: Re:In game cinematics dont work?
Post by: 96th Being on 01 Feb 2003, 23:44:56
Your camcreate line seems to be missing something. Try this :
_cam = "Camera" camCreate [0,0,0]
Title: Re:In game cinematics dont work?
Post by: KTottE on 02 Feb 2003, 01:10:59
LOL
What an obvious thing!
Gah

I will have to slap myself for missing that.

Indeed, the camCreate line is missing "camera".

_cam = "camera" camCreate [0,0,0] is the correct syntax.
Title: Re:In game cinematics dont work?
Post by: Aculaud on 02 Feb 2003, 02:41:46
Your camcreate line seems to be missing something. Try this :
_cam = "Camera" camCreate [0,0,0]

DOH!! :o ??? :o

I havent written script in way too long. Been too ocupied with the raven shield demo, playing something that didnt require me to think. Oh well...

Thanks anyway, guys ::) ;)
Title: Re:In game cinematics dont work?
Post by: Aculaud on 02 Feb 2003, 03:12:36
Ok, the camera part worked fine, but now the mission wont end for some reason. I thought end might have been a reserved variable, so i tried GameOver as the ending mission variable and it still doesnt work. The only thing i changed about the script was that now it actually camcreates a camera. It did work before, by the way.
Title: Re:In game cinematics dont work?
Post by: KTottE on 02 Feb 2003, 09:42:48
Terminate the camera

_cam cameraEffect ["terminate","back"]
camDestroy _cam
Title: Re:In game cinematics dont work?
Post by: Aculaud on 02 Feb 2003, 22:33:19
See, i'm forgetting the obvious. I havent done this in way too long.

Thanks for your trouble,

Aculaud