The following types of interactivity will be covered here:
This type of interaction is the most simple to implement. It just pauses the sequence and keeps it in a loop until the player presses a button. Examples for uses could be: picking something up, moving forward, require to jump, notch the head etc.
A lazy (but easy) implementation would be nothing more then just adding a trackevent to your sequence when the pause should happen and setting up a flowgraph that sets the PlaySpeed of the sequence to 0 and back to 1 when the user pressed the required button:
This implementation has some problems though: the sequence stops and continues suddenly and its completely static, there is no movement at all during the pause. A more sophisticated solution includes several Interpol:Float nodes to slowly (de)-accelerate the playspeed and a small loop (ping-pong in this case) to keep a bit of movement in the scene:
This would now be an infinite pause of the sequence. In order to make it automatically continue after a certain amount of time, we simply add a Time:Delay node as an optional path to the Input:Action node. Please note how to prevent the sequence from continuing two times by the Logic:Gate node!
This interaction include a button press under time pressure and a fail sequence. The implementation looks a bit different to the above situation, as we now don't need a loop to wait for the player input here, but rather continue the sequence normally for the time given the player got to react. If the player fails to press the correct button in time, the normal sequence is stopped and a appropriate fail sequence is started which shows the players death accordingly.
Note that you have to make sure, that the last frame of the main sequence and the first frame of the fail sequence fit more or less together to get proper motion!
Things you might want to add here (but depends on project):
Non-Deadly QuickTimeEvents can be used to lower the difficulty of QTEs coming afterwards and training the player the functionality. The easiest solution would be by letting the sequence continue normally no matter what the player does. Though the better approach would be to give the player some feedback, e.g. letting him stumble but still continue to run. Below is a sample setup which shows how to do it with a separate sequence which runs in parallel to the main sequence (the main sequences playspeed is set to 0 during the playtime of the semi-fail sequence, afterwards main sequence gets set to the last SequenceTime plus length of the semi-fail sequence):
This type of interactivity doesn't change the sequence flow, but rather add some ambient and feedback to the scene. The following actions might be added:
You can add rumbling in Trackview by adding special Script Variables or in Flowgraph by using the node Game:ForceFeedBack. See Force Feedback in cinematics for a detailed description.
You can enable the player to look around freely, even in camera controlled sequences by adding special Script Variables to your Trackview sequence. The variables are:
The values you assign to the keys are the angles of freedom in degrees.
By default the camera will be recentered if no camera control input was received of some time. You can disable this behavior by adding a special Script Variable to the Trackview sequence:
Cinematic_CameraDoNotCenter
Setting the value of this key to 1 will disable the recentering.
Another possibility to add ambient interaction is to allow the player some button presses and let the environment react to it. Examples could be: