Defining :sk: types in C++

I’m working on a C++ class and I’ve come to really enjoy using the :sk: boolean _wait_true/false coroutines. I’m wondering if it’s possible to have a UPROPERTY'd SkBoolean? I haven’t done any :sk: integration via C++ classes before so wasn’t sure if there’s a recommended base include or whether I’d include :sk: types individually as needed.

1 Like

You can use UPROPERTY on any boolean member variables (even bit fields). It will show as a raw data member of type Boolean in SkookumScript.

However, _wait_true/_wait_false cannot be used on raw data members due to how they work. You’d have to loop to wait for it to be true:

loop [if dude.@dead? [exit] _wait]

Or wrap the above code in a coroutine (e.g. _wait_dead).

What I was hoping was that there’d be a way to do this:

UPROPERTY(BlueprintReadWrite, VisibleAnywhere, Category = "Player")
SkBoolean Dead;

And then have all the advantages of a :sk: variable.

I’ll take a closer look at this and give it a deeper think.

I’m in the middle of some meetings though I’ll try to get back to you soon.