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"

GetControlledPawn node does not get the player pawn even after call to Possess

Hello. As stated in the question, when I call GetControlledPawn in the player controller blueprint, no pawn is found (I cast it to a pawn derived class and the cast fails; I also print the name of it to the console if the cast fails and it is an empty string). This only happens when in dedicated server as both clients' playercontrollers don't find any controlled panws, or in a listen server where the server finds the pawn but the client doe not. I am prety new to replication and the UE4 networking framework so I assume I am doing something wrong, but I don't know what.

This is the ClientPostLogin, called after from inside the OnPostLogin event in the GameMode.

This is the function called from ClientPostLogin in the PlayerController.

This is the end of the OnPostLogin event in the GameMode. I call RespawnPlayerEvent before the ClientPostLogin.

This is the part of RespawnPlayerEvent that actually spawns the pawns. Note that I possess the pawns right after spawning them.

Product Version: UE 4.15
Tags:
more ▼

asked Apr 19 '17 at 10:39 AM in Blueprint Scripting

avatar image

carlosasb
1 1 5

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

1 answer: sort voted first

Turns out that it takes awhile for the possession to happen. I just made the call happen during an event set to a timer. Only when GetControlledPawn returns a valid pawn does the function gets called and the timer is cleared.

more ▼

answered May 30 '17 at 02:04 AM

avatar image

carlosasb
1 1 5

(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