User Tools

Site Tools


scripting:cutscenes

Differences

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

Link to this comparison view

Next revision
Previous revision
scripting:cutscenes [2012/03/23 03:02] – created 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.  +
- +
-===== 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.gYou 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 worldOr you might have a building (or item) that 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// pointto //this// pointfrom time x to time y' or 'this model will move from //here// to //here// and do //this// animation'\\ 
-   camposEnd = campos;  +\\ 
-   camposEnd.Add(1,1.5,0.9) );  +If you're new to world buildingcome back here later - you'll get more benefit exploring the event scripting side of thingsIf you're an advanced world-builderappropriate use of well-crafted cutscenes can make huge difference to the appearance of your world.\\ 
- +\\ 
-   AmbientLight#808088 );  +===== Cutscene Reference Materials =====
-   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( camposmodelpos );  +
-   cam.BlendTo( 10.0camposEnd, 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. +  * [[Scripting:Cutscenes:Language|Introduction to the Cutscene Language]] 
 +  * [[Scripting:Cutscenes:Quickstart guide|Quickstart guide]] 
 +  * [[Scripting:Cutscenes:FAQ|FAQ]]
  
-More details to follow.+  * [[scripting:reference:cutscenes|Reference Manual]] 
 +  * [[Scripting:Cutscenes:Samples|Samples]]
  
  
scripting/cutscenes.1332471742.txt.gz · Last modified: (external edit)