User Tools

Site Tools


scripting:cutscenes

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
scripting:cutscenes [2012/03/23 03:05] mitscripting:cutscenes [2025/05/28 16:34] (current) – external edit 127.0.0.1
Line 1: Line 1:
-===== Introduction to Cutscenes ===== +===== Cutscenes Overview =====
- +
-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.  +
- +
-  * [[Scripting:Cutscenes:Language|Cutscene Language]] +
-  * [[Scripting:Cutscenes:Types List|Types Overview]] +
-  * [[Scripting:Cutscenes:Reference Manual|Reference Manual]] +
- +
-  * [[Scripting:Cutscenes:Samples|Samples]] +
- +
-===== 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:+
  
 +You can trigger a cutscene for someone from script or manually using the command :
 <codedoc> <codedoc>
-section(1)  +*cutscene [PLAYERNAME] [CUTSCENE_FILENAME] 
-{  +</codedoc>
-   playerpos = Vector();  +
-   playerpos.SetToLocalPlayerPosition(); +
  
-   modelpos = playerpos;  +The cutscene is contained within a file on the server that the client will downloadCutscenes allow you to control the camera and playeradd models and graphicsadd UI text and do things like play music and control special effects. 
-   modelpos.Add( (1,0,0) ); +
  
-   campos = playerpos  +e.g. You might have a cutscene triggered when a new player joinsthat pans the camera around to show them their environmentand tells them some stuff about your world. Or you might have a building (or itemthat when accessed triggers a cutscene giving the user a storyline or clues that leads to bigger things. \\ 
-   campos.Add( (0,2,1) )+\\ 
 +Cutscenes use a different language (don't ask), where you set thing such as 'the camera will pan from //this// point, to //this// point, from time x to time y' or 'this model will move from //here// to //here// and do //this// animation'. \\ 
 +\\ 
 +If you're new to world building, come back here later - you'll get more benefit exploring the event scripting side of things. If you're an advanced world-builder, appropriate use of well-crafted cutscenes can make a huge difference to the appearance of your world.\\ 
 +\\ 
 +===== Cutscene Reference Materials =====
  
-   camposEnd = campos;  +  * [[Scripting:Cutscenes:Language|Introduction to the Cutscene Language]] 
-   camposEnd.Add( (1,1.5,0.9) ); +  * [[Scripting:Cutscenes:Quickstart guide|Quickstart guide]] 
 +  * [[Scripting:Cutscenes:FAQ|FAQ]]
  
-   AmbientLight( #808088 );  +  * [[scripting:reference:cutscenes|Reference Manual]] 
-   DirectionalLight( (0.2,0.4,-0.7), (0.8,0.75,0.6) );  +  * [[Scripting:Cutscenes:Samples|Samples]]
-   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.1332471931.txt.gz · Last modified: (external edit)