Originally posted by Tom Looman
View Post
Announcement
Collapse
No announcement yet.
Announcing Section #1 for Survival Game - Third-person Player Setup
Collapse
X
-
Originally posted by Tom Looman View Post1. I am using the same method as ShooterGame to handle jumping with some extra functionality.
Originally posted by Tom Looman View Post2. That is a very viable option! With the recent improvements to component editing this is an good alternative.
Comment
-
Originally posted by wilberolive View PostOK, maybe I'm missing something as the jump looks the same to me as how the character jumps in ShooterGame? Do you add more functionality to jumping in a later section (I'm only up to section 2 so far)? Could you point out where I can find this additional functionality so I can study the difference between what you are doing and what the default jump does in the Character Movement Component?
Originally posted by wilberolive View PostHow would this work with the ray tracing when testing if the player is looking at a usable object? Would you get the actor the player is looking at and then check if it has the usable component attached to it before proceeding? Sorry I'm new to UE4 so am trying to get my head around these concepts.
I noticed there isn't a lot of information on C++ interfaces, the docs talk about Blueprint interfaces, the concept is the same though so it might be worth a read:
https://docs.unrealengine.com/latest...ace/index.html
https://docs.unrealengine.com/latest...ces/index.htmlGame Developer @ LODZERO - My Twitter | tomlooman.com UE4 samples & tutorials | C++ Survival Game (Open-Source)
Comment
-
I have a question about this section. I just came in here, hoping to learn C++ coding for UE4, but I have a problem with the files.
If I'm not mistaken, the CPP and H files you linked to at the start of the first section, already includes the code you have added for the other sections as well. If this is the case, then this tutorial will essentially only be accessible to people who were doing it from the very beginning. I mean, as of writing, just the character class is already about 1000 lines long. To me this is extremely confusing and already kind of overwhelming, as I am not certain what code I need to write to make this first section compile without any mistakes (for instance, I already have to take in account at least the base character class, considering it is what the character class is extended from, and I have no idea what functionality written in the character class is reliant on what included class).
Is there any plan or way to make it so people that found these tutorials later (like me) can also follow along?
Comment
-
Originally posted by cridia View PostI have a question about this section. I just came in here, hoping to learn C++ coding for UE4, but I have a problem with the files.
If I'm not mistaken, the CPP and H files you linked to at the start of the first section, already includes the code you have added for the other sections as well. If this is the case, then this tutorial will essentially only be accessible to people who were doing it from the very beginning. I mean, as of writing, just the character class is already about 1000 lines long. To me this is extremely confusing and already kind of overwhelming, as I am not certain what code I need to write to make this first section compile without any mistakes (for instance, I already have to take in account at least the base character class, considering it is what the character class is extended from, and I have no idea what functionality written in the character class is reliant on what included class).
Is there any plan or way to make it so people that found these tutorials later (like me) can also follow along?
https://github.com/tomlooman/EpicSur...tree/Section-1
I hope that helps you a bit in getting into the code, especially Character has grown a lot more than I had anticipated
- TomGame Developer @ LODZERO - My Twitter | tomlooman.com UE4 samples & tutorials | C++ Survival Game (Open-Source)
Comment
-
Originally posted by Gibdion View PostWhere do you assign your DefaultPawnClass?
I couldn't see that anywhere in the code. And I know when I start I project from scratch, I can't get my character to spawn without defined. Am I missing another way?
It's pretty common to create one or more blueprint subclasses of your C++ class. That gives you the flexibility to use either Blueprint or C++ (and easily move logic between them) and gives you the ability to use the built-in features of the editor when it makes sense. If he had wanted to set the pawn in SGameMode, it could have been done the constructor and looked something like this:
Code:DefaultPawnClass = SCharacter::StaticClass();
Code:static ConstructorHelpers::FClassFinder<APawn> PlayerPawnOB(TEXT("/Game/Blueprints/Characters/Character_BP")); DefaultPawnClass = PlayerPawnOB.Class;
)
In this case, it looks like Tom put his common logic into the C++ class and then the things he wants to change between debug and non-debug into the blueprint class (which is a good idea I'm going to steal).
Comment
-
Hi Jeff! Thanks for answering that is such detail
Our top-level character class is a Blueprint "PlayerPawn" (Meaning assigning SCharacter::StaticClass() in code won't give you properly set up character) I'd like to avoid content references in code whenever possible (I might still add this specific case to the code just to demonstrate that it IS possible to do)
- TomGame Developer @ LODZERO - My Twitter | tomlooman.com UE4 samples & tutorials | C++ Survival Game (Open-Source)
Comment
-
Thank you for the explanation.
What confused me is, section 1 of this project has the game mode set to the SurvialGameGameMode, which is the C++ class, not the blueprint class. And has the pawn was set to DefaultPawn, not PlayerPawn BP. For me, based on what you said, I created a blueprint class based on my empty game mode c++ class, and within the BP, I assigned all my items. I do like this method much better. Thanks
Comment
-
Originally posted by Gibdion View PostThank you for the explanation.
What confused me is, section 1 of this project has the game mode set to the SurvialGameGameMode, which is the C++ class, not the blueprint class. And has the pawn was set to DefaultPawn, not PlayerPawn BP. For me, based on what you said, I created a blueprint class based on my empty game mode c++ class, and within the BP, I assigned all my items. I do like this method much better. Thanks
- TomGame Developer @ LODZERO - My Twitter | tomlooman.com UE4 samples & tutorials | C++ Survival Game (Open-Source)
Comment
-
Originally posted by 有亦 View Postwhen i compile the code of section 1,there is a compile error about the func below
void ASCharacter::OnLanded(const FHitResult& Hit) override;
it seems that OnLanded isn't a virtual member function.
my engine version 4.8.2
i just don't understand.Game Developer @ LODZERO - My Twitter | tomlooman.com UE4 samples & tutorials | C++ Survival Game (Open-Source)
Comment
-
I had a thought, based on outline material, how does one fix it so different types of objects have different color outlines?
I assume we create a MID maybe for types of objects. A bomb type for example could have a red color, Food would be yellow. Then in the ray cast, we create the MID and assign the color from the object? I've not worked much with MID, so am I even on the right path?
Just not sure how to access the blendable material in the PP volume through codeLast edited by Gibdion; 07-25-2015, 07:18 PM.
Comment
Comment