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"

Player controller not possesing after swapping

Hello guys.

I am doing a character selection screen and i want the character selected to be spawn and possessed in the next map, i have been reading all over the forums and I do not know what I am doing wrong. Hope you guys can help me.

NOTE: The character selection screen and the gameplay map have different game modes and different player controllers and also, the seamless travel (in both game modes) is enabled.

Here is the config of my game modes:

This is the character selection screen gamemode alt text

This is the gameplay gamemode

Main game mode config

-------------- HERE IS THE DESCRIPTION OF THE PROBLEM -------------------------------

My problem occurs when, in the server, i execute the command ServerTravel [map name]. Like shown in this image.

alt text

Now, when the travel finishes, i have the OnSwapPlayerController event in the game mode. In which I use the old player controller as a reference to get the class, in order to spawn an actor, and possess it by the new player controller like so:

alt text

alt text

The result is that, the travels goes allright, the selected character gets spawned but, it is not possessed by the new PC, the map default pawn is the one that gets possessed.

Product Version: UE 4.16
Tags:
more ▼

asked Aug 22 '17 at 04:37 PM in Using UE4

avatar image

Lethiur
1 1 2 4

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

1 answer: sort voted first

Well, in the end, that part of the code was being executed but then, the gamemode will override the pawn created and put the one in the definition.

To solve that, i just removed the pawn class from the game mode and call the event "spawn and possess" in the begin play of the player controller.

more ▼

answered Dec 01 '17 at 01:06 PM

avatar image

Lethiur
1 1 2 4

(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