Visual scripting

We are currently working on improving the documentation on Visual Scripting.
Here is a basic example of how to play a continuous machine gun loop while space is held.


RuntimeManager.CreateInstance is used to create a new sound, then it is started in the enter state and stopped in the exit state. Note the instance needs to be stored in a variable otherwise we will lose our reference to it. Also note the use of RuntimeManager.AttachInstanceToGameObject so that the Event Instance’s transform will follow the player’s position.
State Graph:
image
Transition to “Firing”:

Transition to “Not Firing”: