x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Earliest Point to Reliably Acquire Data from Reliable RPCs

Hello. Are there any events that occur before a player is spawned that wait for RPC calls to be completed before firing?

My specific case needs to use data sent from my subclass of the client's PlayerController in the my GameMode's ChoosePlayerStart_implementation() function, based on data from the client's GameInstance. I guess this question can be more general, though, for other use cases.

Is there some RPC handshake point that we can guarantee all reliable RPCs (particularly Server and Client RPCs on PlayerControllers) will be done by? Or are we supposed to let UE4 do its thing, which will automatically spawn the player, then despawn what UE4 created and respawn the player with the appropriate data when we finish doing our thing?

Thanks.

Product Version: UE 4.13
Tags:
more ▼

asked Oct 11 '16 at 05:01 AM in C++ Programming

avatar image

ScottMichaud
193 6 5 12

avatar image ScottMichaud Oct 18 '16 at 03:25 AM

Apparently no such time exists. In fact, BeginPlay() on APlayerController and its subclasses could even occur before RPCs are transmitted. Call them on APlayerController::PostLogin() (or later) and respawn the player pawn if spawning requires server knowledge.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

I think in your scenario you would need to send the GameInstance data when the client logs on to the server. This way you can spawn based on that data.

https://wiki.unrealengine.com/Passing_Arguments_To_Server_During_Connection

more ▼

answered Apr 03 '17 at 02:22 PM

avatar image

Mingah
66 4 6 12

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question