So I’ve been working on a “Rapid” game-mode where I use a custom round system instead of the built in Fortnite one. The issue is, I ran into potentially a bug (or my code is wrong) when I test the map out in a published version.
So how its supposed to work (and does work in the UEFN edit session) is when my “made up” round starts, I disable spawnpads so that eliminated players will spectate. When it ends, I re-enable the spawnpads and run code that respawns all of the players (Not just spectators):
RespawnPlayers():void=
AllPlayers := GetPlayspace().GetPlayers()
for (TeamPlayer:AllPlayers):
TeamPlayer.Respawn(vector3{X:=-43674.66103,Y:=-36654.716304,Z:=3189.238969}, rotation{})
The location that players respawn in is into an elimination zone. This is so that the “game” can respawn them itself. The reason why I do this is because it seems to be a work-around for a bug with spectating. If a player is respawned through verse and not the game, you can’t spectate them until the game respawns them itself.
So, this works all fine and great while testing in the UEFN edit session, no bugs at all! The issue comes when we publish the island and test it out on a private island code.
Here is a video showcasing what happens in the edit session vs published island code, the end shows it side by side: https://youtu.be/wIvTCgJaewM?si=hpz_VvP9VwXXV-5X
To summarize what happens, it seems like the Respawn code only runs for players who are still alive, which negates the whole point. Not only that, but everything runs delayed compared to the edit session.
Can anyone think of any solution for this? Is there something I did wrong or do you think its a bug? I appreciate any help!