Download

Order Of Events Rundown?

I was wondering if anyone had reference to or could help me out with a flow-chart of the order of events firing in a client - dedicated server setup. I’m running into some issues such as database requests being sent before the database connection is fully established and I’m trying to figure out exactly what order events are happening in as far as GameMode, PlayerController, Level Blueprint, etc.

The specific current issue I am having is that upon the client connecting to my dedicated server, the client’s player controller fires a database request to retrieve the X,Y,Z position and rotation of their character from where they previously logged out and then teleport the actor to that location. There are 2 issues occurring here - first, the database connection is established in the GameMode BeginPlay but doesn’t seem to be occurring before the PlayerController retrieve event. Second, the Set Actor Location & Rotation event freezes my game unless I add a delay between the database request and event. I can solve both of these issues by adding delays, one delay of a second before firing the retrieve XYZ data in order to let the server connection establish, and another one second delay after the data retrieval but before the set location and rotation event, but that seems like a really sloppy way of solving this. Also it introduces the issue that the character will spawn at 0,0,0 and beginning dropping into the world for one full second before teleporting to the proper XYZ location retrieved. I looked into using PlayerStart actors but I don’t think they will work for me as the player could potentially need to start gameplay at an infinite number of locations, basically anywhere in the world they were when they logged out.

I feel like this could all be solved just by figuring out the exact order that events occur across different blueprints but I ran out of time last night while troubleshooting.

Any help or reading would be great, thanks.

Does this help?