Advanced scripting techniques
With the level whitebox nearly complete, it's time to start thinking about those scripted events. Scripting level events can add immensely to any level and can be as simple as triggered sounds or particle effects, or as complicated as fully scripted cutscenes or minigames. Unreal 4 gives us the ability to visually program these sequences using the flexible Blueprint system. We've used Blueprint before for simple doors and elevators back in Chapter 2, Starting Our First Project. Now we will build on that knowledge to design and program flexible scripted events.
So how do we start? Designing a scripted event is not unlike our animations systems we have built before. Each one starts with an event that causes several different actions to fire in a sequence. The trick is to be able to logic out the sequence so that we get the desired effect with the player. For example, the average game explosion has a few different actions:
Wait for the target object to take damage...