Ongoing C++ Gameplay Example Series: Making a Survival Game

Changing the damage type is not enough, that’s purely to identify the kind of damage was applied, and has nothing to do with actually applying damage to hitpoints or FX.

ShooterGame has an implementation for projectile based weapons, and the project uses a nearly identical weapon framework. the class is named ShooterWeapon_Projectile I believe. That should be a good starting point.

Hya !

Just noticed you adapter your project to 4.10, tried compiling it to check the differences:



Severity	Code	Description	Project	File	Line
Error	C2248	'FActiveSound::AudioComponent': cannot access private member declared in class 'FActiveSound'	SurvivalGame	D:\Unreal Projects\SurvivalGame\Source\SurvivalGame\Private\Editor\SoundNodeLocalPlayer.cpp	13
Severity	Code	Description	Project	File	Line
Error (active)		member "FActiveSound::AudioComponent" (declared at line 74 of "d:\UnrealEngine-release\UnrealEngine-release\Engine\Source\Runtime\Engine\Public\ActiveSound.h") is inaccessible	SurvivalGame	d:\Unreal Projects\SurvivalGame\Source\SurvivalGame\Private\Editor\SoundNodeLocalPlayer.cpp	13
Severity	Code	Description	Project	File	Line
Warning	C4996	'USkinnedMeshComponent::bChartDistanceFactor': bChartDistanceFactor is no longer useful, please remove references to it Please update your code to the new API before upgrading to the next release, otherwise your project will no longer compile.	SurvivalGame	D:\Unreal Projects\SurvivalGame\Source\SurvivalGame\Private\Items\SWeapon.cpp	16



Just thought you should know :slight_smile:

PS- I see you’ve changed the messages to IDs, nice!

You can fix the error in this way

In SoundNodeLocalPlayer.cpp change this



AActor* SoundOwner = ActiveSound.AudioComponent.IsValid() ? ActiveSound.AudioComponent->GetOwner() : NULL;


with this



AActor* SoundOwner = ActiveSound.GetAudioComponent()->IsValidLowLevel() ? ActiveSound.GetAudioComponent()->GetOwner() : NULL;


:slight_smile:

I know lol but thanks anyway :slight_smile:

The goal is for him to push the fixes onto the repo so other people wont have problems.

Btw you M.O.S looks great!

To what extent can we use this as a base for our projects?

And is there a way to rename the project/files from SurvivalGame to our name?

It’s quite simple, you can use it like ShooterGame and all the other Epic sample content. Meaning you can use it as a starterkit to build your own project on top of.

As for renaming, I’ve seen some tools floating around that will help with renaming, but none were a guarantee that you didn’t need to add manual edits for it to compile again.

Oh so nice! Do you know the name of the tools - searched for them yet can’t seem to find them.

Additionally, can you explain two things:

  • What is the LocalPlayer class about? Doesn’t seem to do anything at all.
  • When the clients on a multiplayer game load another clients, (e.g., I’m player A, and I see player B), which class exactly is loaded on local client A for player B? Is it a normal instance of the default character class?

Lastly, I know this is pretty specific, but if the loaded client is just an instance of the default player class, how are we supposed to distinguish between them? Should we check IsLocalPlayer() ?

LocalPlayer is useful when dealing with multiple users on a single machine (so mostly for game consoles) when using splitscreen or local multiplayer, each player has one LocalPlayer instance that holds some info on name, HUD etc. Generally you don’t do a whole lot with this class, but it will exist even for your single player game.

When you see another player, you see his Character (eg. Pawn)

that is indeed how you usually check, IsLocallyControlled() etc.

:smiley:

Thank but is not so great, has a lot of limitations but i’m happy people is liking it :slight_smile:

Hi, I have renamed some code projects using FAR before, works fine.
see:

and:

Hello everyone,

I’ll probably look like the biggest newbie ever but… after spending tons of time opening and checking every things, I was unable to find where the “Main Menu” Widgets is managed… is it me who are really blind or it’s hardcoded somewhere ?
I had a memory that I found it before, but now unable to retrive where it’s managed…

Thank you in advance !
Sincerely.

If I recall correctly this is added through the Level Blueprint of the main menu map.

After checking again, I found where the widget was… sorry for disturbing…

Great job for your work !

hello, I start on EU4, let me know how it is to add to project my project. a simple video’ll be fine? thx

how do we project to add the survival game on Unreal 4 engine?

Links are not working.

I just checked the links in the OP and they all work fine. What’s not working on your end?

Hi ,
Do you have any plan for another tutorial ?

Yes I do.

is this project still alive ? i checked it couple of times and it seem a great Resource since i want to learn co-op on 4.10 :ٍD