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 , particularly 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 :
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.
The creation of most scratch made missions should be done using the barebones mission template, which includes 3 main states :
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 cut scene, 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.
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.
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.
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.