Skip to content

10 — Play Movie...

Hands the whole screen over to a movie and returns the mission when it finishes.

Editor data
Numeric ID
10
Engine ID
TACTION_PLAY_MOVIE
Editor name
Play Movie...
Need token
NEED_MOVIE
Parameters
  1. Moviemovie
Attachment
none
INI example
[Actions]
<TriggerID>=1,10,0,<Movie>,0,0,0,0,

The action names no music track of its own, so nothing is queued behind the movie, and nothing is faded or stopped on the action’s account.

The music stops all the same, and it stops as the movie opens rather than partway through it. The game plays its own sound through an output fixed when the game starts at 22,050 Hz, 16 bits and a single channel. Opening a movie measures its soundtrack against that output and rebuilds the output around the soundtrack under any of:

  • the soundtrack carries a different number of channels;
  • it was recorded at a different sample rate;
  • it uses a different sample width.

Rebuilding the output stops everything the game had playing through it — sound effects, speech and the music alike. A soundtrack in stereo answers the first of those on its own. The measurement happens before the movie is looked at, so even a movie too small to be shown stops the music on its way to being passed over.

A movie carrying no soundtrack at all, and one recorded in exactly the form above, leave the music playing. It still does not last the movie out. A music track is read from disk a block at a time, and that reading only happens between game frames; a full-screen movie holds the game for its whole run, so not another byte of the track is read while it plays. What was read ahead before the movie carries on — sixteen blocks of a little over eight kilobytes, of which between eight and fourteen hold sound at any given moment — and then the track falls silent for the rest of the movie. For a compressed music file that is somewhere between six and eleven seconds. A file stored without compression holds a quarter as much sound per block and runs out about four times sooner.

Music comes back when the mission does. The interrupted track does not resume: the game finds nothing playing and starts the next one from its beginning.

Caveats
  • Only a campaign game shows the movie. A skirmish or any multiplayer session reaches the action, passes over the movie without a word, and carries on with the rest of the trigger's actions.
  • A movie that cannot be found, cannot be opened, or is too small to be shown is passed over just as silently.
  • The escape key cuts the movie short and the mission resumes from that point. No other key does.
  • The screen is filled black before the movie and again after it, and the whole display is redrawn once the mission comes back.