Cineractive Configuration

Examples
Cineractive
Enter cineractive mode and execute the script which follows. A cineractive script contains a sequence of
At commands. When the cineractive has progressed the number of seconds in the argument of the At command, the block of instructions inside the At command are executed once.

NOTE: At commands must be entered in INCREASING TIME ORDER or the script will not behave as expected
DefineDebriefing(string name)
Create a named debriefing for later execution. Instructions inside DefineDebriefing are not executed immediately, but when a Debriefing instruction is given from an
Action.
A Debriefing script has a similar syntax to a Cineractive script, and contains a sequence of At commands.
At(float time)
Multiple
Contains a group of instructions to execute at "time" seconds into the cineractive.
DisableIFace(bool flag)
Turn the interface on or off during cineractive. Interface is automatically turned back on when the cineractive ends.
DisableInput(bool flag)
Enables or disables mouse and keyboard input during cineractive. Input is automatically enabled when the cineractive ends.
DisableShroud(bool flag)
Enables or disable terrain shroud and line of sight during cineractive. Shroud is automatically enabled when the cineractive ends.
EndCineractive()
Ends the cineractive, and returns to the game by default.
SkipPoint()
Specifies that when the user hits the escape key, the cineractive will skip up to the next SkipPoint encountered, or EndCineractive if there are no skip points.
SetBookMark()
Places the camera on a curve and begins moving along it.
An additional block of commands can be specified which will be passed to the camera. See
SetCamera.
Name(string name)
Required
name: name of curve.
Start(float time)
Optional(0)
Jump to 'time' seconds into the curve before moving.
DefaultCamera()
If the camera is on a curve, returns to the default user controlled camera (either beginner or advanced).
SetCamera(string name)
Activate a camera.
name: Name of camera to activate.
An additional block of commands can be specified which will be passed to the camera.
Region(string name)
Cameras: Padlock
Place camera in the region.
Position(float x, float y, float z)
Cameras: Padlock
Move camera to x,y,z.
Height(float y)
Cameras: Padlock
Set camera height above terrain.
Tag(string name)
Cameras: Padlock, Curve
Focus on the centre of the tag.
Pause()
Unpause()
Pause or unpause gameplay. This does not pause playback of the cineractive.
Letterbox()
Letterbox mode.
Time(float in, float hold, float out)
in: Scroll smoothly over 'in' seconds.
hold: Hold for 'hold' - 'in' seconds.
out: Scroll smoothly out over 'out' - 'hold' seconds.
Direction(string dir)
Specifies the initial direction
Optional(up)
dir: "up" to have letterbox open up, "down" to have letterbox close in.
Color(integer r, integer g, integer b)
Optional(black)
Border color.
Priority(integer i)
Optional(0)
Specify the drawing priority, lower means drawn earlier.
Fade()
Screen fade.
Time(float in, float hold, float out)
in: Fade smoothly over 'in' seconds.
hold: Hold for 'hold' - 'in' seconds.
out: Fade smoothly out over 'out' - 'hold' seconds.
Direction(string dir)
Specifies the initial direction
Optional(up)
dir: "up" to fade from color, "down" to fade to color.
Color(integer r, integer g, integer b)
Optional(black)
Screen color.
Priority(integer i)
Optional(0)
Specify the drawing priority, lower means drawn earlier.
Text()
Display text on the screen.
Time(float in, float hold, float out)
in: Fade smoothly over 'in' seconds.
hold: Hold for 'hold' - 'in' seconds.
out: Fade smoothly out over 'out' - 'hold' seconds.
Direction(string dir)
Optional(up)
Specifies the initial direction
dir: "up" to fade from in, "down" to fade away.
Color(integer r, integer g, integer b)
Optional(white)
Text color.
Font(string name)
Optional("System")
Pos(float x, float y)
Optional, x(0.5), y(0.5)
Normalized screen coordinates that the text will be centred around.
(0,0) is the top left
(1,1) is the bottom right
(0.5,0.5) is the centre of the screen
(0.5, 0.95) is the centre of the bottom letterbox border
(0.5, 0.05) is the centre of the top letterbox border
Priority(integer i)
Optional(0)
Specify the drawing priority, lower means drawn earlier.
Subtitle()
Configure sub titles generated by game messages.
ItemConfig()
Required
Text configuration for sub titles.
See
Text
Priority(integer i)
Optional(100)
Specify the drawing priority, lower means drawn earlier.
Image()
Render single image.
Time(float in, float hold, float out)
in: Fade smoothly over 'in' seconds.
hold: Hold for 'hold' - 'in' seconds.
out: Fade smoothly out over 'out' - 'hold' seconds.
Direction(string dir)
Specifies the initial direction
Optional(up)
dir: "up" to fade from color, "down" to fade to color.
Image(TextureSpecification texture)
texture: See TextureSpecification.
Absolute(bool flag)
Optional(false)
flag: if true, uses AbsPos and AbsSize otehrwise uses Pos and Size
Pos(float x, float y)
Optional, x(0.0), y(0.0)
Normalized screen coordinates of the top left of the image.
(0,0) is the top left
(1,1) is the bottom right
(0.5,0.5) is the centre of the screen
Size(float x, float y)
Optional, x(1.0), y(1.0)
Normalized screen coordinates of the size of the image.
(1,1) is the same size as the screen
(0.5,1.0) is half the width but full height of the screen
AbsPos(integer x, integer y)
Optional, x(0), y(0)
Absolute screen coordinates of the top left of the image.
If x is less than 0, then image right aligned, and moved left -x pixels.
If y is less then 0, then image is bottom aligned, and moved up -y pixels.
AbsSize(integer x, integer y)
Optional, x(0), y(0)
Absolute screen coordinates of the size of the image.
Priority(integer i)
Optional(0)
Specify the drawing priority, lower means drawn earlier.
Wallpaper()
Render sheeted images.
Time(float in, float hold, float out)
in: Fade smoothly over 'in' seconds.
hold: Hold for 'hold' - 'in' seconds.
out: Fade smoothly out over 'out' - 'hold' seconds.
Direction(string dir)
Specifies the initial direction
Optional(up)
dir: "up" to fade from color, "down" to fade to color.
Sheet(integer x, integer y)
Required
Images to sheet.
x: number of images on x axis.
y: number of images on y axis.
This must be followed by exactly (x * y) "Image" commands.
Image(TextureSpecification texture)
texture: See TextureSpecification.
Pos(float x, float y)
Optional, x(0.0), y(0.0)
Normalized screen coordinates of the top left of the image.
(0,0) is the top left
(1,1) is the bottom right
(0.5,0.5) is the centre of the screen
Size(float x, float y)
Optional, x(1.0), y(1.0)
Normalized screen coordinates of the size of the image.
(1,1) is the same size as the screen
(0.5,1.0) is half the width but full height of the screen
Priority(integer i)
Optional(0)
Specify the drawing priority, lower means drawn earlier.
Debrief()
Enter debriefing mode. When this command is encountered during a running cineractive (and not during DefineDebriefing) the game will enter debriefing mode. There is no way to return to game mode once entering debriefing mode.
Exec(string file)
Multiple
Execute a configuration file, this could contain the interface for the debriefing screen.
file: filename of configuration file.
OnEvent(string name)
Multiple
When a Interface control of type "MissionLinkButton" with name "name" is pressed, the following instructions are executed.
name: name of control.
AddBookmark()
Optional
When the debriefing is run, one of the bookmarks specified here is randomly picked and moved along during the debriefing.
Name(string name)
Required
name: name of bookmark.
Action()
Execute an Action through the objective system.

Examples

Debriefings

An objective should trigger at the start of the mission that sets up a default debriefing.
CreateObjectType("Obj", "Objective")
{
  GameObj();
  ObjectiveObj()
  {
    Condition("TRUE");
    Action()
    {
      Cineractive()
      {
        // Define a debriefing
        DefineDebriefing("my_debriefing")
        {
          At(0)
          {
            // Enter debriefing mode immediately upon executing the cineractive
            Debrief()
            {
              // Event processing when "next" button is pressed
              OnEvent("Next")
              {
                // Any other commands that normally appear in an IControl
                // "OnEvent" scope can go here

                // This will link to the next mission
                LoadMission("next_mission");
              }

              // Execute this interface file
              Exec("interface_game_debrief.cfg");

              // Bookmarks to cycle through
              AddBookmark()
              {
                Name("bookmark1");
                Name("bookmark2");
                Name("bookmark3");
                Name("bookmark4");
              }
            }
          }
        }

        // Execute the intro cineractive
        At(0)
        {
          // Actual cineractive sequence goes here
        }
      }
    }
  }
}
Fading and letterboxes

This sequence will start with a black screen (that a title can be placed over), and as the blackness fades away, the viewport will shrink into letterbox mode.
At(0)
{
  // Start with black screen, hold black screen for 3 seconds,
  // then fade the black away over 1 second
  Fade()
  {
    Time(0, 3, 4);
    Direction("up");
  }
}

At(3)
{
  // As the black is fading away, close up into letterbox mode, and keep it
  // there until the cineractive is over.
  // In this example, the cineractive is 15 seconds long, and the final fade
  // will have us in blackness at time 13.5, so stay in letterbox mode until
  // then (13.5 (end time) - 3 (start time) = 10.5)
  Letterbox()
  {
    Time(1, 10.5, 10.5);
    Direction("down");
  }
}

At(12.5)
{
  // Start another fade sequence that will get us to blackness at 13.5,
  // and ending at 15 when the cineractive will terminate.
  Fade()
  {
    Time(1, 1.5, 2.5);
    Mode("up");
  }
}

At(15)
{
  // Done
  EndCineractive();
}
Camera switching

Say we have a curve "A" which is 20 seconds long, and a curve "B" which is 15 seconds long. We want the camera to travel along "A" for 10 seconds, then run along B for 10 seconds, then back to "A" where it left off before being interrupted by "B".

At(0)
{
  // Start moving along "A"
  SetBookmark()
  {
    Name("A");
  }
}

At(10)
{
  // Now cut to "B"
  SetBookmark()
  {
    Name("B");
  }
}

At(20)
{
  // And back to "A", at offset 10, where it was interrupted
  SetBookmark()
  {
    Name("A");
    Start(10);
  }
}