Flowgraph Missions

An alternative to using the predefined mission templates is to create a new mission using the flowgraph system.

Flowgraph is a dynamic node based scripting that allows the creation of more complex missions using a systems of elements linked together.

Before creating a flowgraph mission, you should check out the introduction page , particularily the elements and flow , as those are used for pretty much any flowgraph mission.

To create a flowgraph mission, simply select “flowgraph” as the mission type, and then “Create New and Open Flowgraph Project” -> Any of the available templates

There are 3 available templates :

  • Empty Project : A template with nothing in it. Only reccomended for more advanced users.
  • Barebones Mission Template : Predefined basic 3 state mission template, with an intro state, gameplay state and outro state.
  • Simple Scenariolike Template : Similar to the scenarios we have before, including a reset loop, and more predefined elements compared to the barebones template.

If you have never done a flowgraph mission before, you should check out the flowgraph mission example to give you an idea of the various elements you can use in a mission, and why you’d use them.

Basic structure

The creation of most scratch made missions should be done using the barebones mission template, which includes 3 main states :

  • Intro
  • Gameplay
  • Outro

Intro

The introduction state is the sate where everything required to run the mission is done. This includes things like positioning the player’s vehicle, loading in prefabs, showing a cutscene, etc.

With any mission, the game will fade to black when entering the mission, allowing you to do things hidden from the player’s view like positioning prefabs.

A “Fade from black node” IS required at some point in the intro state, to restore the player’s view.

Once the introduction is complete, it should flow to the gameplay state.

If you have some sort of mission restart loop, to allow the player to reset the mission using R key in case his vehicle gets stuck, it should run the introduction state again.

Gameplay

The gameplay state is where the fun happens, and control is given to the player.

This state should have all the objectives and other conditions that the player has to successfully completes to finish the scenario.

Outro

The outro is used to conclude the mission, show the end screen to the player along with his score, and the unload prefabs.

The very last node should be a fade to black, as the mission will automatically unload prefabs and fade from black at the end, before giving control back to the player.

Last modified: 3/12/2021 11:52

Any further questions?

Join our discord