<vnscene name="ExampleScene"> <item ref="eth" prefab="prefabs/SimpleSpinningCubePrefab" /> <item ref="craig" prefab="prefabs/SimpleSpinningCubePrefab" /> <item ref="bg" prefab="prefabs/SimpleSpinningCubePrefab" /> <item ref="square" prefab="prefabs/SimpleSpinningCubePrefab" /> <events> <!-- Set the default values --> <position item="bg" x="0" y="0" z="0" /> <position item="craig" x="0" y="0" z="1" /> <position item="eth" x="0" y="0" z="1" /> <position item="square" x="0" y="0" z="10" /> <set property="square->material->color" value="COLOR_BLACK" type="struct Color" /> <set property="craig->material->color.a" value="0" type="uint8_t" /> <!-- Fade out the black overlay --> <set property="square->material->color.a" to="0" duration="1" curve="easeOut" type="uint8_t" /> <!-- Example Text, also showing how in future we can support multiple languages --> <text character="eth"> <string lang="en">Hi, I'm Ethereality.</string> </text> <!-- Fade in craig --> <set property="craig->material->color.a" to="255" duration="1" curve="easeOut" type="uint8_t" /> <text character="craig"> <string lang="en">Hi, I'm Craig.</string> </text> <!-- Because each event stops things happening until it's complete, let's assume we want to do two things at once, say move and fade out a character at the same time. This will make craig exit screen left. --> <parallel> <set property="craig->material->color.a" to="0" duration="1" curve="easeOut" type="uint8_t" /> <position item="craig" x="-2" duration="1" curve="easeOut" /> </parallel> <!-- Now Craig is gone, so sad, let's now fade the screen out and present some choices --> <set property="square->material->color.a" to="255" duration="1" curve="easeOut" type="uint8_t" /> <!-- Here I am creating a marker --> <marker name="craigCool" /> <choices character="eth" key="isCraigCool"> <title> <string lang="en">Do you think Craig is cool?</string> </title> <choice value="no"> <string lang="en">Yes</string> </choice> <choice value="yes"> <string lang="en">No</string> </choice> <choice value="maybe"> <string lang="en">Maybe</string> </choice> </choices> <!-- Now we have a choice, we can use the key to get the value of the choice and do something with it. In this case, we'll just show a different message depending on the choice. If the user selects "Maybe", we basically just display a message and then go back to the choices indefinitely. --> <if key="isCraigCool" value="maybe"> <text character="eth"> <string lang="en">Are you unsure?</string> </text> <goto-marker name="craigCool" /> </if> <if key="isCraigCool" value="yes"> <text character="eth"> <string lang="en">I agree, Craig is cool.</string> </text> </if> <if key="isCraigCool" value="no"> <text character="eth"> <string lang="en">I disagree, Craig is cool.</string> </text> </if> <text character="eth"> <string lang="en">bruh9000</string> </text> <!-- We can also modify values/set values too. --> <choice-set key="isCraigCool" value="yes" /> <!-- We can also wait some time --> <wait duration="1" /> <!-- Now change scenes. Changing scenes is handled in-engine to stop the game crashing from a lack of memory. --> <!-- <scene-change name="scenes/ExampleScene2" /> --> </events> </vnscene>