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"

Office Holiday

Epic Games' offices will be on holiday from June 22nd to July 7th. During this period support will be limited. Our offices will reopen on Monday, July 8th. 

Can't set default pawn class following tutorial steps

Hi, I'm currently doing this tutorial: https://docs.unrealengine.com/latest/INT/Programming/Tutorials/FirstPersonShooter/2/1/index.html

I'm trying to set the Default Pawn Class to BP_FPSCharacter, but when entering Play mode, I am still allowed movement and there is no message saying "We are using FPSCharacter." from GEngine. I don't get any errors compiling or building.

I have already included Engine.h and gone into Project Settings and changed the Default Pawn Class to BP_FPSCharacter. Is this tutorial not possible because it was made for UE 4.11?

My code:

FPSCharacter.cpp // Fill out your copyright notice in the Description page of Project Settings.

 #include "FPSProject.h"
 #include "FPSCharacter.h"
 #include "Engine.h"
 
 
 // Sets default values
 AFPSCharacter::AFPSCharacter()
 {
      // Set this character to call Tick() every frame.  You can turn this off to improve performance if you don't need it.
     PrimaryActorTick.bCanEverTick = true;
 
 }
 
 // Called when the game starts or when spawned
 void AFPSCharacter::BeginPlay()
 {
     Super::BeginPlay();
     
     if (GEngine)
     {
         // Put up a debug message for five seconds. The -1 "Key" value (first argument) indicates that we will never need to update or refresh this message.
         GEngine->AddOnScreenDebugMessage(-1, 5.0f, FColor::Red, TEXT("We are using FPSCharacter."));
     }
 }
 
 // Called every frame
 void AFPSCharacter::Tick( float DeltaTime )
 {
     Super::Tick( DeltaTime );
 }
 
 // Called to bind functionality to input
 void AFPSCharacter::SetupPlayerInputComponent(UInputComponent* PlayerInputComponent)
 {
     Super::SetupPlayerInputComponent(PlayerInputComponent);
 
 }
 
 

FPSCharacter.h // Fill out your copyright notice in the Description page of Project Settings.

 #pragma once
 
 #include "GameFramework/Character.h"
 #include "FPSCharacter.generated.h"
 
 UCLASS()
 class FPSPROJECT_API AFPSCharacter : public ACharacter
 {
     GENERATED_BODY()
 
 public:
     // Sets default values for this character's properties
     AFPSCharacter();
 
     // Called when the game starts or when spawned
     virtual void BeginPlay() override;
     
     // Called every frame
     virtual void Tick( float DeltaSeconds ) override;
 
     // Called to bind functionality to input
     virtual void SetupPlayerInputComponent(class UInputComponent* PlayerInputComponent) override;
 
 };
Product Version: UE 4.14
Tags:
more ▼

asked Jan 11 '17 at 04:22 AM in C++ Programming

avatar image

joy4314
1 1 1 2

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

1 answer: sort voted first

I just ran into this problem too. In the overhead menu in the Unreal Editor, select the Blueprints drop down. From there, select Project Settings -> Game Mode -> Pawn -> Select Pawn and then manually select the name of your blue print pawn.

That's what worked for me

more ▼

answered May 27 '17 at 11:15 PM

avatar image

flipflop
6 1

(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