[5.3] "is locally controlled" returns false if instanced through RestartPlayeratPlayerStart

Hello everyone,

I’m attempting to add respawning (or in this case, just spawning) to my game, and I’m encountering some rather odd results from using the built-in nodes for the purpose. The resulting pawn claims not to be locally controlled.

In my game mode, players start as spectators. Then, when a key is pressed, the player is spawned via the RestartPlayeratPlayerStart node. However, for some reason, this causes the pawn to claim that it is not locally controlled, which completely breaks my blueprint and causes all sorts of unintended effects.

Is this intended behaviour? Did I set up anything wrong?
When searching for previous posts talking about this issue, most seemed to involve a lot of C++, something I’m trying to avoid with my mostly blueprint-only project.

Relevant parts of my game mode:



image

Relevant part of my character controller:

Relevant segment of my pawn character (returns false):
image

I appreciate any answer, even just theories as to what could be causing this. The documentation I have on hand at the moment isn’t of much help, so I’m mostly flying blind. This is a networked game (but I am testing in standalone netmode).

It returns false to “is controlled”, so it might potentially be another dastardly race condition.

Yeah, It is. Adding a delay fixed it.

I’m overjoyed that I have located the problem and resolved the issue, yet disappointed that the issue exists at all. A pawn’s begin play node should probably trigger after they’ve been spawned, but all dependencies have finished assigning themselves.

I guess the moral of the story is that race conditions will always be a problem independently of everything else. Only with hatred and paranoia can such a menace be combated.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.