This is an old revision of the document!
Introduction to Cutscenes
You can trigger a cutscene for someone at any point in your script. The cutscene itself is defined in a file on the server that the client will download. Cutscenes allow you to control the camera and player, add models and graphics, add UI text and do things like play music and control special effects.
e.g. You might have a cutscene triggered when a new player joins, that might pan the camera around to show them their environment, while displaying text introducing the player to the world. Or you might have a building (or item) that when accessed triggers a cutscene giving the user a storyline or clues that would lead to other gameplay on your world.
Cutscene Language
Purely for the reason that this feature was added as an interesting experiment, cutscenes are defined using a separate, custom, object-orientated language.
Here is a basic example:
<codedoc> section(1) {
playerpos = Vector(); playerpos.SetToLocalPlayerPosition();
modelpos = playerpos; modelpos.Add( (1,0,0) );
campos = playerpos campos.Add( (0,2,1) );
camposEnd = campos; camposEnd.Add( (1,1.5,0.9) );
AmbientLight( #808088 ); DirectionalLight( (0.2,0.4,-0.7), (0.8,0.75,0.6) ); Model( "Data/Models/Bldgs/StdHouse02.atm", "Data/Models/Bldgs/StdHouse02.bmp", modelpos, (0.0,0.0,0.8) );
cam = Camera( campos, modelpos ); cam.BlendTo( 10.0, camposEnd, playerpos);
caption = Caption( 0.5, 0.65, "This is an example of a cutscene", 1 ); caption.FadeIn( 1, 2 ); caption.FadeOut( 5, 6 );
} </codedoc>
This example adds a house model near to the player, sets lighting, sets a camera that pans across the scene, and adds a caption that fades in then fades out.
More details to follow.
