scripting:cutscenes:language
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.
scripting/cutscenes/language.txt · Last modified: 2020/01/28 17:50 by 127.0.0.1