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.
1) In your default test project, create a new default map. Place a
TriggerBox somewhere in your level.
2) Let's make it into its own BP. Make sure it's highlighted in the
World Outliner then find the
Blueprints button on the toolbar. Click it and select
Convert Selected Actor to Blueprint Class.... Let's call it
BP_LaunchPad. Once inside, add a
SkookumScriptClassData component. Compile, save, and hit the button to move to the Skookum IDE.
3) Let's add a method called
fling to our new class. This will be our script inside:
(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.
4) Compile and let's move back to Unreal and open up
BP_LaunchPad. Drag out a connector from
Event ActorBeginOverlap and then let go. You'll get a search dialogue for all relevant nodes. You could start typing
fling to 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.
5) Now we'll need to connect
Other Actor from our
Event to our node. However, our node expects a
Pawn so we'll need to do some casting. Drag out a connector from
Other Actor and look for
CastToPawn. Add the node and reroute the flow connector through it to
Fling. Then connect
As Pawn in the cast node to
height to some value;
1200 should be good enough. Compile, save, and run the game.
7) 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.