[RESOLVED] Editing Blueprint Instance Variables from SkookumScript

Hi guys,

In my code, I have a Blueprint class called GameMaster, which has an instance variable called current_time.

In SkookumScript, I can get the value of it using @current_time, but I’m unable to set the value using @current_time : 1.0 – it won’t even compile!

I then went back to Blueprint and deleted current_time, then created it as an instance variable inside SkookumScript. Now assignment works fine!

I’ve read a few threads, including “Exposing instance_data to the gui of unreal”, but am unable to determine the root cause of the problem.

Could anyone please shine some light on this?

Thanks!

OK, I bumped into this post which demonstrates instance variable assignment using := rather than :.

@current_time := 1.0 is now working.

Is there a reason why the @current_time : 1.0 works with a Skookum-made instance variable and not with a Blueprint-made instance variable?

Thanks!

1 Like

Hi David - here is an older post explaining what is going on:

Let us know if you have any other questions!

We’ll be putting up more docs on these details with data members on our web pages soon too so you won’t have to dig around in the forums.

Makes a lot of sense now that I understand the implementation details. I’m still very fresh to the language / runtime, so thanks for your patience!

One more follow-up: how do you embed snippets of the other post like that? I see you guys doing it all the time and it’s hugely handy. I’d love to do the same.

Thanks again.

Great to hear! Not sure if I’m more excited for better docs or the Slate-based IDE. :slight_smile:

1 Like

Sure thing! Just paste a link to the other post into your post and the forum software (discourse) will insert the snippet.

Easy. Thanks. Guess that’s what I get for being fancy w/ Markdown. :slight_smile:

Added notes - the link must be on its own line and you can include the top post “/978”:

or include a specific numbered sub-post “/978/5”:

1 Like

Slick. Will take advantage for sure!