User Tools

Site Tools


scripting:reference:cutscenes:caption

Cutscenes Reference : Caption class

Caption objects are used to display 2d text on the screen.

Caption inherits from FadeObject

Creation Parameters

Example : Caption( 0.5, 0.8, “This is my caption text”, 1, 1.0, 2.0, 5.0, 6.0 )

1 : X Position
2 : Y Position
3 : Text
4 : Flags
5 : Start Time (Seconds)
6 : Fade In End Time (Seconds)
7 : Fade Out Start Time (Seconds)
8 : Fade Out End Time (Seconds)

Member Functions

Set

TBD

SetText

TBD

Inherited from FadeObject : FadeIn, FadeOut, SetPos

Example

Here is a simple example demonstrating captions - It displays a bit of text from 10 to 18 seconds, then a different bit from 30 to 38 seconds. Note that we can use different methods to set the fade in and out times - which to use is mostly a matter of preference.

<codedoc> section( 1 ) {

  caption = Caption( 0.5, 0.65, "This is a rock", 1, 10, 12, 16, 18 );    
  caption = Caption( 0.5, 0.65, "but this is a special rock", 1 );    
  caption.FadeIn( 30, 32 ); 
  caption.FadeOut( 36, 38 ); 

} </codedoc>

scripting/reference/cutscenes/caption.txt · Last modified: 2020/01/28 17:50 by 127.0.0.1

Except where otherwise noted, content on this wiki is licensed under the following license: Public Domain
Public Domain Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki