Let’s say I need to run some logic, like data loading or apply effects to new players joining an exisiting session.
The way I’m currently doing this is by registering methods to all my player_spawner_devices, but I’m wondering if this is the best way to do it?
I just want to know if this device is 100% reliable with no failing chance.
I’m concerned because I noticied sometimes (pretty rare) player_spawner_device is not triggering the respective subscribed methods, specially when the game starts while Fortnite is minimized, but I’m not sure if that’s an UEFN session bug or something else.
Sometimes depending on what you’re doing you might want to run when players are spawned with the spawner devices, but there is a method for when players join the game but haven’t spawned. Make sure you have using { /Fortnite.com/Playspaces } and then you can do GetPlayspace().PlayerAddedEvent().Subscribe(OnPlayerAdded) GetPlayspace().PlayerRemovedEvent().Subscribe(OnPlayerLeft)
You’ll then have to make the OnPlayerAdded and Left functions yourself and put your logic in there.
I believe these playspace events will be more reliable than player spawners but am not sure, mostly they are better because they will only get called once each for every player, while using spawn pads you run it every time the player spawns.