The Blueprint visual scripting system is one of the most exciting features UE4 brings to artists and level designers, allowing a level of control that was previously out of reach without having some knowledge of writing code. The range of systems and features you can access with Blueprint script is extensive, and while this means there’s a great deal of creative potential, figuring out how it all works can seem daunting at first.
So what kinds of things can you actually make with Blueprint? The list below provides some general examples, and will hopefully show why it’s worthwhile to dive in, start experimenting, and take the time to learn how to make the most of this system.
Create level script
The Level Blueprint fills the same role that Kismet did in Unreal Engine 3, and has the same capabilities. Each level has its own Level Blueprint, and this can reference and manipulate actors within the level, control cinematics using Matinee actors, and manage things like level streaming, checkpoints, and other level-related systems. The Level Blueprint can also interact with Class Blueprints (see the next section for examples of these) placed in the level, such as reading/setting any variables or triggering custom events they might contain.
Create interactive objects
Class Blueprints are ideal for making interactive assets such as doors, switches, collectible items and destructible scenery. In the image above, the button and the set of doors are each separate Blueprints that contain the necessary script to respond to player overlap events, make them animate, play sound effects, and change their materials (the button lights up when pressed, for example).
In this case, pressing the button activates an event inside the door Blueprint, causing it to open - but the doors could just as easily be activated by another type of Blueprint, or by a level script sequence. Because of the self-contained nature of Blueprints, they can be constructed in such a way that you can drop them into a level and they’ll simply work, with minimal setup required. This also means that editing a Blueprint that’s in use throughout a project will update every instance of it.
Create customizable prefabs with construction script
Construction script is a type of graph within Class Blueprints that executes when that actor is placed or updated in the editor, but not during gameplay. It’s useful for creating easily customizable props that allow environment artists to work faster, such as a light fixture that automatically updates its material to match the color and brightness of its point light component, or a Blueprint that randomly scatters foliage meshes over an area.
In the Content Examples maps, the long rooms that contain each example (pictured above) are actually a single Blueprint made up of many components. The Blueprint’s construction script creates and arranges the various static meshes and lights according to parameters exposed in the Blueprint’s details panel. With each Content Example map we created, we were able to drop in the demo room Blueprint, set values for the length, height, and number of rooms that would be generated (and a few other options), and have a complete set of rooms ready in moments.
A Blueprint like this can be time-consuming to create initially, but if you know you’ll use it often, the time saved when building a level and the ease of making changes can make it very worthwhile.
Create a playable game character
Pawns are also a type of Class Blueprint, and it’s possible to put together every element you need for a playable character in the Blueprint graph. You can manipulate camera behavior, set up input events for mouse, controller and touch screens, and create an Animation Blueprint asset for handling skeletal mesh animations.
When you create a new Character Blueprint, it comes with a character component that has much of the behavior needed for moving around, jumping, swimming and falling built-in, and all that’s required is to add some input events in accordance with how you want your character to be controlled.
Create a HUD
Blueprint script can be used to create a game’s HUD as well, which is similar to Class Blueprints in that it can contain event sequences and variables, but is assigned to your project’s GameMode asset instead of being added directly to a level.
You can set up a HUD to read variables from other Blueprints and use them to display a health bar, update a score value, display objective markers, and so on. It’s also possible to use the HUD to add hit-boxes for elements like buttons that can be clicked on or, in the case of mobile games, can respond to touch input.
All of the examples pictured here exist in the sample content available with UE4, so if you want to get a closer look, they can be found in the Content Examples, Shooter Game and Swing Ninja projects.
What do you guys think? Are you excited about all of the things you can do with Blueprint? Don’t forget to stop in at our forums and give us your feedback!