I need to run an event but ONLY 1 time when the server starts… and then save it to an array that I’ll use else where … how would I do this?
example of what I want
event begin play -> set sam(int) to 5
then in multiple blueprints I want to be able to use GET sam
I’m not sure where you would/could put it, but if you want it to run on the server just use the “Switch Has Authority” node before whatever it is you’re doing and using a DoOnce node will only run whatever comes after that once.
There’d be no use putting it in the PrimalGameData event graph because there’s currently no way to reference PrimalGameData in-game, you can manually assign it to a variable in the ADK but you can’t read from it.
Only place I can think of would either be a file in your mod, or the Level BP, but supposedly it’s not appropriate or recommended to do that.
-WM
Thanx for the reply someone else gave me an idea and it seems to be working (I ran it on item construction) so it only runs once because the item is only placed once