VersionPlusOne bug/CharacterMesh not showing multiplayer c++

Hey there,

Create a custom game mode and make sure it points to your custom character as the default pawn, then override the used game mode in the project settings with the one you created.

Alright, so im creating my own multiplayer game and i have a blank project. I started with a blank project because I wanted to learn how everything worked such as movement and i had my own models and i got them in the engine. Now ive made my character mesh derived from my PlayerCharacter.CPP (the actual character) and i plugged everything in and im not getting a character mesh on the client side nor the server side. I tried local gameplay, the character isnt showing up at ALL. Second i have a lot of warnings and i dont understand why. All it says is that theres a global shadow in multiple unreal engine premade scripts and im not understanding. I even made a third person template so i can follow that and understand how the camera was made and what not. The mesh still isnt showing in my project but shows in the ue4 premade one.

video link to whats going on

Hi!
Thank you for responding! I have already done this! I have in my game mode as follows :

ACreateCharacterLobby::ACreateCharacterLobby(const FObjectInitializer& ObjectInitializer): Super (ObjectInitializer){

DefaultPawnClass = APlayerCharacter::StaticClass();

}

anything on the versionplusone bug?

bump :confused: anyone out there?

Sorry i missed the email when you commented.

This won’t work if you have the mesh plugged in a custom BP version of your player character.

I suggest just linking the default pawn BP to the game mode in editor but if you really wanna do it in code, set it up like the attached image code example from UE4’s FPS sample.

Regarding the warnings, it had never happened to me but then again i only used UE4 on windows and never on Mac or Linux, if it doesn’t result in a failed build i’d just try to ignore it or maybe one of the UE4 staff will comment a way to suppress these warnings.

I just noticed that there’s also a warning inside your APlayerCharacter, if you can show me a screenshot of the warning’s location inside that class maybe i could help

“By link the default pawnbp to the game mode in editor” you mean switching the reference? because I already did that! Still hasnt worked :confused: I believe you’re right i think they are just bugs that i should ignore unitl they pose a problem. The warning is just a place holder right now in the APlayerCharacter but i will still screenshot it so you know whats going on!

Yeah by linking it in the editor i meant going to Edit->Project Settings->Maps & Modes, and making sure that the default pawn under “Selected Game Mode” there is your custom BP character (that has the mesh). Because if this was a replication problem, you’d still see your character at least on client side. Other problems that come to mind are setting up the mesh or the camera incorrectly, if you still can’t fix it and it’s possible to send me the project files maybe i could help.

Regarding the warning, you probably have a “bool bSprinting” in your header file and is being shadowed by the one passed into that function, so just change the variable name of one of them.

Because if your game mode has a C++ base, you can declare variables and functions that you could use in other C++ classes, but if you declare them in BP you can’t access it in C++.

So the whole workflow in a C++ project is to build a code base for the BP children to use in editor, as BP makes it easier to reference actors and other classes.

Note that you could also implement a function in BP and access it in C++ but you still need to have a declared UFUNCTION in C++ base with a BlueprintImplementableEvent specifier.

I see now , it makes sense. I was confused because i thought you couldnt use the BP if you had a C++ game mode but you can just parent it and they’ll work off each other! Thank you

Edit: wait once you reparent the game mode it doesnt work anymore lol. So whats the point of having a gamemode C++ if the best way to set your whole character up is by BP? becuase if you have a C++ game mode you cant edit the pawn class through the editor

Ah i see that makes so much sense! I also found out my gamemode wasnt working becasue i had to verify ue4, something mustve happened while I was coding and it broke a bit. BUT it works! Thank you so much for helping and verifying!