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"

Spawn As A Default Player Character

When I start the game I want to spawn as the default player character. This works if I play in editor. When I play the packaged game or Standalone game, I spawn as a spectator. I set:

     bStartPlayersAsSpectators = false;

In the constructor of MyGameMode class. But I still spawn as a spectator, I also never am able to leave spectating mode. Is there something I am missing?

Product Version: UE 4.13
more ▼

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

avatar image

492 66 65 211

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

1 answer: sort voted first

Hey Janyx,

If I'm understanding your question correctly, you're looking to set your character class as the Default Pawn for your Game Mode.

Here's an example of my game mode's constructor where I did this with my player class:

     DefaultPawnClass = APlayerCharacter::StaticClass();

This will allow you to set the Default Pawn, which is the class that you will automatically possess upon entering any play mode. You'll just need to replace APlayerCharacter with whatever the class is that you'd like to be your default pawn.

Let me know if that's what you're looking for.

Have a great day

more ▼

answered Oct 11 '16 at 06:30 PM

avatar image

Sean L ♦♦ STAFF
43.6k 485 152 442

avatar image Janyx Oct 11 '16 at 06:34 PM

Thanks for the reply. unfortunate that isn't my question. I have the default pawn set. the problem is when I start the game I don't spawn as the default pawn I instead spawn as the default spectator.

Like I stated above this is only happening when I play the package version or standalone game. PIE works correctly.

(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