Download

cast doubts

Good everyone, I have a newbie doubt. I have a blueprint class where I have defined a boolean variable and I want to try to access its value in my gamemode class, does anyone know how I can do this? I’ve tried it with cast, actors of class and so on. Thank you all!

The are multiple ways to do it, but the easiest way is to to make the actor set the reference in the gamemode to itself:

In the actor:
image

In the gamemode:

If you have multiple actors, you would use an array instead:

In the actor:
image

In the gamemode:

Thank you for the help!

1 Like