Create Skookum nodes for use in Blueprints
Remember that you can download the tutorial project here. This tutorial uses map Level3.
This is a quick and easy tutorial for making a BP node out of your Skookum method. This write-up assumes that you’ve already gone through the previous tutorials.
In your default test project, create a new default map. Place a
TriggerBoxsomewhere in your level.
Let’s make it into its own BP. Make sure it’s highlighted in the
World Outlinerthen find the
Blueprintsbutton on the toolbar. Click it and select
Convert Selected Actor to Blueprint Class.... Let’s call it
BP_LaunchPad. Compile, save, and hit the button to move to the Skookum IDE.
Let’s add a method called
flingto our new class. This will be our script inside:
&blueprint (Pawn pawn, Real height) [ pawn.launch_pawn(Vector3!xyz(0, 0, height)) ]
&blueprint keyword which tells the compiler that this will be a BP node.
Compile and let’s move back to Unreal and open up
BP_LaunchPad. Drag out a connector from
Event ActorBeginOverlapand then let go. You’ll get a search dialogue for all relevant nodes. You could start typing
flingto look for our new node but an even quicker way is to type
@to display all Skookum nodes. Currently, we only have the one so hit Enter to add it.
Now we’ll need to connect
Other Actorfrom our
Eventto our node. However, our node expects a
Pawnso we’ll need to do some casting. Drag out a connector from
Other Actorand look for
CastToPawn. Add the node and reroute the flow connector through it to
Fling. Then connect
As Pawnin the cast node to
heightto some value;
1200should be good enough. Compile, save, and run the game.
When you walk through the
TriggerBox, the overlap event fires off calling our node and in turn calling the scripts within it to fling our player upwards!
Of course, this was just a simple example with a one-liner script. Imagine the advanced and complex scripts that you can create and fit within one single node.