Hello everyone am trying to override the method in my class derived from ACharacter::.
And am trying to override the Method
virtual void Landed(const FHitResult & Hit)
So what i started to do was just add a debug message to the function but it never triggers.
is a snip from my Character class.
// .h
virtual void Landed(const FHitResult& Hit) OVERRIDE;
// .cpp
void AMyProjectPlayerClass::Landed(const FHitResult & Hit)
{
Super::Landed(Hit);
if (GEngine)
{
GEngine->AddOnScreenDebugMessage(-1, 5.f, FColor::Green, TEXT("LANDED() Lets do fall damage?"));
}
}
In the documentation it says.
Am trying to trigger the event by “falling” from high places on my test map.
Am assuming that this don`t get called if i jump.
If i can get any help with this? I be very greatfull.
Cheers!
Ok so i manage to figuer out the problem and as i suspected it was not due to wrong code.
But there is or atleast i have some bugs with the Unreal Build Tool or the Header Tool (Am not sure.)
I will try to explain when i started my project i went like a good programmer and devided of my source file in a proper folder structure.
Everythign works fine until i add a GetLifeTimeReplication() Method.
I get link errors and when stuff do compile my server crashed and in the logg it says it can`t find the replicating variable Health.
So i remember from the documentation that its recomended to Refresh Your Visual Studio Project and i did.
“Generate Visual Studio Project Files” (Shell command) and what happens is it then it loads all the sorce files into VS 2013 outside the created folders / filters.
So i remove the folder structures and have eberything in Source/Project/.h and .cpp files.
And now everything is good again.
So now am having a difrent type of promblem where my code thos not get executed.
Refreshing the project again and what do you know it generates the project with the folder structure (That i have not used for weeks.) and duplicates with no folder or filters in VS.
I Delete the files that are in the folders in the source directory and in VS and Re-Build and now Landing() is triggering.
Whats happening ?
Way is the Editor / Build, Header Tool loading / placing files or duplicating them?
This is a realy anoing problem and i am never certen of what code its actualy compiling.
I delete the duplicates and its all good but how do i prevent this, its realy slowing down my work flow.