GetAgents[] returns more players than I have on the session

I’m not sure this is intended, but looking at the function, I think it should simply return the number of players in a team.

Upon reconnecting to the session, this number gets incremented, thus it can return more players than I have in the server.

Looks like this function is actually returning some sort of PlayerController instances but they seem to be persisted throughout the session. (eventhough the same player reconnects many times)

I’m gonna try retrieving the ‘fort_character’ of the agents for now, but I think this function could be reworked / renamed.

I’m open to discussion…

2 Likes

2/2/25 and I don’t think this is fixed. When a player leaves a match in session the phantom player persists. Even upon pushing changes and refreshing the session it doesn’t go away. Do the developers even look at these forums anymore?

This post was created before they did the new “issue” forum category, so this has probably never been sent to their backend, would need to create a new ticket if you have a repro

1 Like

Sorry to bother you, but would you happen to know why I can’t re-show a creative_prop nor can I re-enable a mutator zone when the player leaves the game? This code runs when the player leaves, the other model gets teleported just fine, but the mutator zone and the SelectModel do not get re-enabled/shown.

You sure the code runs ? Did you add a Print to test ?

1 Like

I mean, the TeleportTo code (on last line) runs just fine and They get disabled/hidden in the same manner as this in another function (.Disable() / .Hide()). I guess if all else fails I can just teleport the model/zone instead of disabling and hiding.

1 Like

I forgot the “?” for the PlayerRef variable LOL, what I thought was the Teleport function running was just an artifact caused by a player leaving the game - I’ve fixed it now thanks!

1 Like