Home   Help Search Login Register  

Author Topic: Ending a cutscene  (Read 735 times)

0 Members and 1 Guest are viewing this topic.

Offline THobson

  • OFPEC Patron
  • Former Staff
  • ****
Ending a cutscene
« on: 02 Jan 2005, 22:40:01 »
This must be a well known issue, but not to me.

I want to end a cutscene with a BLACK OUT, display some text for a few seconds and then end the mission.  So I have tried various cominations of :

Code: [Select]
titlecut ["","BLACK OUT",5]
~5

titletext ["The text I want to display","plain down",3]

~10

End1 = true
~2

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

exit

What actually happens is I get the black out and the text, but it then takes ages before the mission ends.

What could I do differently?

Offline The-Architect

  • Former Staff
  • ****
  • Bite my shiny metal...
    • Bob's Un-official Flashpoint Page
Re:Ending a cutscene
« Reply #1 on: 03 Jan 2005, 00:18:32 »
I call all my text from a different script running at the same time. Maybe that might help you?
James Andrew Wilkinson 1977 - 2005 R.I.P.
"If it ain't the friggin' incoming it's the friggin' outgoing. Only difference is who gets the friggin' grease, and that ain't no friggin' difference at all."

Offline THobson

  • OFPEC Patron
  • Former Staff
  • ****
Re:Ending a cutscene
« Reply #2 on: 03 Jan 2005, 00:23:03 »
Thanks.  I never thought of that.  The titletext is temporary before I do some proper Xenofanes type text.  I woundered if that would solve the problem also.

Offline Triggerhappy

  • Contributing Member
  • **
  • Llama, it's what's for dinner.
Re:Ending a cutscene
« Reply #3 on: 03 Jan 2005, 03:21:43 »
when you use titletext, it will stay on the screen for a while. that might be why it won't end

Offline Sui

  • Former Staff
  • ****
    • OFPEC
Re:Ending a cutscene
« Reply #4 on: 03 Jan 2005, 03:46:25 »
Yeap.... a mission won't end until all titles are finished.

I'd suggest adding this line just above your camera termination lines:

Code: [Select]
titletext ["","PLAIN DOWN"]
That will clear the titles off the screen, and end the mission sooner ;)

Offline Triggerhappy

  • Contributing Member
  • **
  • Llama, it's what's for dinner.
Re:Ending a cutscene
« Reply #5 on: 03 Jan 2005, 05:59:00 »
hmm.. does cuttext work the same way? (probaby but its worth a shot)
because it isn't a "title" persay (spelling right for that?) so it might not get in the way....

*LOOOOOONG SHOT*

Offline Sui

  • Former Staff
  • ****
    • OFPEC
Re:Ending a cutscene
« Reply #6 on: 03 Jan 2005, 06:03:27 »
not sure....

It's still a title, but it's in the 'background' channel so may not effect the end trigger. Then again, I could be full of crap (I don't have access to OFP at the moment so can't check).

Either way, you can clear it's titles the same way:

Code: [Select]
cuttext ["","PLAIN DOWN"]

Offline Triggerhappy

  • Contributing Member
  • **
  • Llama, it's what's for dinner.
Re:Ending a cutscene
« Reply #7 on: 03 Jan 2005, 06:11:09 »
wow i was right!
i just tested it out with some triggers in the editor.
it showed the text and it was still up when the game ended
i'll go test with a smaller delay to be sure....

yep, it definitely works
« Last Edit: 03 Jan 2005, 06:12:03 by Triggerhappy »

Offline THobson

  • OFPEC Patron
  • Former Staff
  • ****
Re:Ending a cutscene
« Reply #8 on: 03 Jan 2005, 13:02:48 »
I have been playing around with titletext and titlecut, I had even tried
titlecut/titletext ["","plain down/black out"]  etc.  all with no joy.

I have not yet tried cuttext

Can anyone explain the difference between
titlecut, titletext and cuttext?

Offline Triggerhappy

  • Contributing Member
  • **
  • Llama, it's what's for dinner.
Re:Ending a cutscene
« Reply #9 on: 03 Jan 2005, 17:55:50 »
comref v. 1.85
Quote
titleCut effect
Operand types:
    effect: Array
Type of returned value:
    Nothing
Description:
    Obsolete.

titleText effect
Operand types:
    effect: Array
Type of returned value:
    Nothing
Description:
    Text title - argument in format ["text","type", speed] or ["text","type"] If speed is not given, it is assumed one.

Example:
    titleText ["Show this text", "PLAIN"]

cutText effect
Operand types:
    effect: Array
Type of returned value:
    Nothing
Description:
    Text background - argument in format ["text","type", speed] or ["text","type"] If speed is not given, it is assumed one. Type may be one of: "PLAIN", "PLAIN DOWN", "BLACK", "BLACK FADED", "BLACK OUT", "BLACK IN", "WHITE OUT", "WHITE IN".

Example:
    cutText ["", "BLACK OUT"]

so titlecut will do nothing, titletext is used in the foreground, it takes importance it seems,but you can speed it up by adding the speed argument.cuttext is in the background channel, and it doesn't matter if it is finished or not when the game ends (tested that)

of course this is just what I figured out from the comref, Sui, and my testing

Dubieman

  • Guest
Re:Ending a cutscene
« Reply #10 on: 07 Jan 2005, 03:51:22 »
Well have you tried

******************
titlecut ["The text I want to display","BLACK OUT",5]

~10

End1 = true
~2

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

exit
***************************

You should be able to have text there. And I've used cuttext for only one reason. Because a stringtable & sounds were screwing my scene up so cuttext forced the words in there.

 :-\


Offline Sui

  • Former Staff
  • ****
    • OFPEC
Re:Ending a cutscene
« Reply #11 on: 07 Jan 2005, 06:20:48 »
Yeap... that happens.

In the sound portion of your description.ext, all your sound definitions will have a 'title' field.

* Sui goes to dig up one of his old .ext's

eg.
Quote
   class SCR_Heysarge
   {
      name = "SCR_Heysarge";
      sound[] = {"SCR_Heysarge.ogg",db+20,1};
      titles[] = {   0, $STRM_SCR_Heysarge};
   };
   class SAP_hittinganything
   {
      name = "SAP_hittinganything";
      sound[] = {"SAP_hittinganything.ogg",db+20,1};
      titles[] = {};
   };
The first sound I've defined there has the titlefield defined as $STRM_SCR_Heysarge. There's a corresponding line in my stringtable.csv to give that sound it's subtitle. When the subtitle is displayed, it will do it as titletext, so any other foreground resource (titletext, titlecut, titlersc etc.) will be wiped off the screen as the sound plays.

The second sound I've defined there has nothing in it's title field. This means there will be no subtitle, and it will not interfere with anything else (text or resources) that you have in the 'title' channel.

If there is anything at all between those curly brackets in the title line, when the sound plays it will erase whatever is on the screen in the 'title' channel.

Anyway, rather longwinded...  but that's why you would lose resources or text when a sound plays.

I like to use cuttext (or cutrsc) for when I want to display two different things on screen at a time. It can be used to do some good effects ;)

Offline THobson

  • OFPEC Patron
  • Former Staff
  • ****
Re:Ending a cutscene
« Reply #12 on: 07 Jan 2005, 09:09:32 »
There is good stuff here thanks to you all.  

I had not appreciated the 'foreground' 'background' aspect of some of these commands.  It warrants a fair amount of experimentation (on my part).  

I am a bit snowed under at the moment but I hope to get back to this sometime next week so I am not ignoring you.

Dubieman

  • Guest
Re:Ending a cutscene
« Reply #13 on: 07 Jan 2005, 20:58:16 »
So Sui, this would be my problem then?

   titles[] = {0, ""};

That would be erasing my wonderful titletext? :P :(
If so, then I have wasted a looong time on those sounds back in August. :'(

As long as mine works now, though, but the info is appreciated. ;)



Offline Sui

  • Former Staff
  • ****
    • OFPEC
Re:Ending a cutscene
« Reply #14 on: 08 Jan 2005, 00:07:14 »
Yeap ;)

Get rid of the 0, "" and you'll be away laughing.