Cutscenes and Objectives
The most recent update to the TileGame is the ability to create Cutscenes and Objectives.
Cutscenes are a series of actions that are played out in sequence. They are defined in yaml and can trigger just about any event in the game.
Objectives are just triggers that can be displayed to the player and can optionally follow up with another cutscene.
Here's an example from the tutorial. It does the following:
- creates a wall to block the path forwards
- faces the player to the south
- moves the player to the start of the map
- plays a dialog
- creates an objective
Name: TutorialIntro
StartTransition: FadeIn
Actions:
- ActionType: SpawnEntity
GridEntityId: 0cc28e30-230e-4773-8e9d-7d5ca4aaf0e2
Name: Wall
Id: Wall1
Position: pos:*/name/SpawnWallPosition
- ActionType: FaceTo
Target: ent:*/state/owner:ai&health:alive
FaceToDirection: South
- ActionType: Wait
Seconds: 0.7
- ActionType: MoveTo
Target: ent:*/state/owner:player^1
MoveTo: pos:*/name/StartMapPosition1
- ActionType: Dialog
DialogText: Welcome to the VR training sim. Take a moment to get your bearings.
PortraitPath: uid://36mr2f4bpaxy
- ActionType: Dialog
DialogText: You can find your weapon on your back. When you're ready try hitting that enemy.
PortraitPath: uid://36mr2f4bpaxy
- ActionType: CreateObjective
Title: Kill the dummy
Condition: Kill
Target: ent:*/id/TutorialDummy1
CompletionCutscene: res://Resources/Cutscenes/Tutorial/Tutorial2.yml
Here's the result in game: