I am doing a game that will be a multiplayer with dedicated server. I work on it from a long time now but this morning something happened and I wasn’t able again to launch my game.
In fact, when I launch the game, player has to enter is ID and password and then, we open a map and he is able to see himself, walk, run…
The problem is due to my spawn / possess system.
Here it is :
In the blueprint of my map (the map that I will launch after login) I have the following nodes :
And then, in my player character blueprint I have an event on possessed that call an event on owning client (that will do many things like calling UI, calling event on server that will do some stuff, setting some variables…).
The problem is that the server don’t execute the owning client event anymore. I saw on the internet that the client possessed the pawn after the Server so since we call an event run on owning client I think that since we do not have yet owning client it is the reason why it doesn’t work…
The problem is that I have no idea how to solve that… I saw that some people add a delay before calling event but it is not really a good idea in my mind. I tried with a delay of 1s and sometimes it works and sometimes it don’t… I am sure that if I add a big delay (10s) it will works well, but I think it exists a better way to do that…
did you solve the problem somehow? I have the same issue right now. Also after server travelling in packaged game possessing character takes way too much time (around 3 seconds) and I do not know why. Please let me know if you have any updates.
Thanks in advance and wish you a pleasant rest of the day
Sorry, I never found a good solution… Since nobody answered me, I found a “bad” solution. I have added a delay node before calling the run on owning client event in the “on possess” event. And since I have also seen that it could take some seconds, I decided to have a delay of 5s.
If we think about it, 5s to launch a game is nothing, so it is not a big deal, but how to be sure it will never take more than 5s ? We can’t…
Sorry, it is the only solution I have found, and I agree it is quite ugly…
If someday you find a real solution, please tell me
I saw a nice use of a temp timer, but when I implemented it last week to replace the delays I was using it broke my project and I’ve spent days now trying to get it working again. I don’t know where the issue is but in theory, this seems like a better route than delay nodes.
**update, I was trying to bind an event to PlayerState OnPawnSet and it was giving me a ton of issues, I removed that and the temp timers worked great.