on_skookum_triggered


#1

I’m following the on_skookum_triggered sample in the ‘SkookumScript Unreal Engine 4 Plugin’ video, but the on_skookum_triggered event does not appear in Events section of the Hero blueprint. Is there something I am missing?

I created the following and compiled the class:

on_skookum_triggered().sk

//---------------------------------------------------------------------------------------
// Method description…
//
// Params:
// arg1:
//
// Return Params:
// rarg1:
//
// Returns:
//
// Notes:
// Examples:
// See:
//---------------------------------------------------------------------------------------

(Real float_value, Pawn pawn, Boolean is_active?, Vector3 some_vector)
[
// Replace with custom code body or leave blank for C++ routine.

Debug.println(float_value)
]


#2

Hi Mantlog, thanks for trying to re-create the example. For this to work you need to make two changes:

  1. SkookumScript functions exposed to Blueprints as events must not have a body as they are being called from SkookumScript and call into Blueprints. So you need to delete

    [
    // Replace with custom code body or leave blank for C++ routine.

    Debug.println(float_value)
    ]

  2. Since we made the video we have changed the way SkookumScript methods, coroutines and events are exposed to Blueprints in order to give users precise control over what to expose to Blueprints and what to keep private to SkookumScript. To use your event method in your graph, you have to prefix it with the annotation &blueprint.

So it should read like this:

&blueprint
(Real float_value, Pawn pawn, Boolean is_active?, Vector3 some_vector) 

Hope this helps - let me know how it works for you!


#3

Thanks for replying GG. I just found some instructions here:

I entered the following

&blueprint
(Real float_value, Pawn pawn, Boolean is_active?, Vector3 some_vector)

and a blueprint function appears in blue “Pawn @ On Skookum Triggered”

In the video “Add Event > Skookum Script” has “Event On Skookum Triggered” which produces a red event, but this section is not visible at all.

Is there something I should do when I create the method, to tell Skookum it is an event? Or perhaps it is meant to be this way?


#4

Not to worry, I figured it out. There is an i/c button and I didn’t know what it was for. When I select instance it shows up in red in the Skookum IDE and red in Blueprints. You might need a little tool tip for that button.


#5

It stands for instance or class members for routines or data. There is much that needs to be more clear.

We are in the midst of a complete IDE user interface revamp that uses the same Slate UI system as the Unreal Editor. It allows us to make the UI completely graphical and as clear and custom as needed. Stay tuned!


#6

Apparently UE4 currently does not allow any static function (“class member”) to be placed as an event for some reason. So events have to be instance members.


#7

Hi,
Me again. :slight_smile: I had time to play with this again and am not able to make the event trigger. I call it using the F4 key and it just says nil. I removed the input params from the function, so I could call it as below:

Hero.instances_first.on_skookum_triggered()

In the Hero Blueprint I have ‘Pawn @ On Skookum Triggered’ attached to the ‘Print Text’ function, but there is no output to Unreal’s Output Log Window.


#8

Hi MantLog - hmm I replicated what you did and it works fine for me. Does your graph look like this?

When I invoke Hero.instances_first.on_skookum_triggered it prints “Skookum!” into the game window. A return value of nil is correct.

Can you double check, maybe in the Blueprint debugger, if the event fires? Set a break point on the Print String node and it should be hit when you execute the code from within SkookumScript.

Code syncing between the SkookumIDE and UE4Editor still has a known glitch so you might try restarting UE4Editor just to be sure.


#9

Code syncing between the SkookumIDE and UE4Editor still has a known glitch so you might try restarting UE4Editor just to be sure.

That got it working. Thanks!