Can't set references to my array in the Gamemode BP

So I have multiple target points placed in my level that I’m trying to get their references to an array in my Gamemode bp.
This is what I’m using in my level blueprint:


And this is how I check if the array’s indeed been loaded with the references or not:

The output is always 0.

Are you using your game mode, did you specify it in the world settings?

The begin play in your game mode might run before your blueprint that’s setting the array.

Maybe it’s better to also have a blueprint interface call to get the array back again?

1 Like

The begin play in your game mode might run before your blueprint that’s setting the array.

You were right! Adding a delay node to the gamemode bp fixed it but I don’t quite like this solution. Is there a better one?
Could you clarify this?

Maybe it’s better to also have a blueprint interface call to get the array back again?

So in my game mode, I set a bool

image

and when I want to know it’s value

image

1 Like

Thanks for the clarification, I mainly used bp interfaces to replace the cast, any other use of it sounds absurd to me at first.

They are for any time you want to talk to an actor without wanting to know the type…

Not sure if better but you could have the game mode Get All Actors of Class with Tag, after tagging Target Points. The whole thing could be fired on Begin Play in the GM:

image

It also greatly depends on what you’re planning to do with those. Perhaps getting them once and binding what’s needed with dispatchers is better - this way you’d need no arrays or hard references afterwards at all.


How to approach the whole things depends on the scope. If it’s only 3 and you’re doing it once, I’d tag them.

1 Like