Crysis 2 Scripting

Explosion Slow Motion Script

The video is a brief scripted moment in my Crysis 2 level, Destroyer.  This script provides an intense WOW moment that knocks the player down.

Goals of this scripted moment:

  • Force player to look at explosion, regardless of how they approach the vehicle
  • Slow down time during explosion
  • Blur Screen and play explosion sound
  • Knock player back away from explosion

Overview of the FlowGraph explosion sequence.  This can be further broken down into 3 sections: Initial Trigger, 0.25 Seconds Later, and 1.00 Second Later.

Initially hitting the trigger forces the player to turn and look at the military vehicle.  The force look takes less than 0.1 seconds for the player to completely turn.  At the same time, a bomb threat detection is played.

At 0.25 seconds, the explosion particle effect is triggered, the time scale slows down to 10% normal speed, and the screen begins to blur.  Also at this time, the player begins the knocked back animation, and because the player was forced into looking at the vehicle in the previous section, the player is propelled in the normal in relation to the explosion.

At the 1 second mark, the blur fades, the force look is disabled, the time scale returns to normal, and a faint heartbeat sound plays.

Boss Script

Using the LOGIC: AND node and two bosses, I can fire off a script regardless of which boss the player kills first.

Helicopter Intro Cinematic Script

 

This is the script for the intro cinematic.  The goal of this script is for the player to be able to move the camera freely during the cinematic from the first person perspective.  

The section labeled “Camera Rotation” takes the player’s controller/mouse input and applies it to a camera that is attached to the helicopter bay.

The section labeled “Play Sequence” starts the cinematic sequence.  The trick to the camera control is that the sequence has a director group and a camera group, but the camera has no data in the track view, thus allowing the player to move the camera around during the cinematic.

The section labeled “Animations and Sounds” plays the helicopter blade animation and the chatter that pilot speaks.