Log is not reporting

Hi my log is not outputting.
Following the other threads on the subject, my enemy character parent is the ‘BP_ShooterCharacter’. I have stopped started the Editor, and recompiled numerous times. This is the Take Damage Function
Along with the

If you require any further information please let me know

Can you send the gun code?
Did the enemy could hurt you?

Hi Philix
Here is the Gun code… Thanks for taking a look :slight_smile:


Did your particles spawned at the good location when you fired?
You could also verify with other log command in the gun.cpp like after

if (HitActor != nullptr)

and others statement to check where your code work and don’t work. you can log the actor hit name for example with:

UE_LOG(LogTemp, Warning, TEXT("Actor hit : %s"), *HitActor->GetName());

You’re calling TakeDamage on the gun and not the hit actor

Ok have done some more testing.
If I place the LOG in the (HitActor != nullptr) section I get it reported fine

HitActor Output

When I place a breakpoint along side the TakeDamage Function Call in the same IF block I get the following:

So you can see ( in my mind all is as expected). If I then try to continue to the next line i get the following:

Not sure how to fix that, so if anyone knows… Please tell me :slight_smile:

BUT if i place a breakpoint against the Super call in the ShooterCharacter.cpp It never gets there?
Hence why I am not seeing the Log Warning message for decreasing health.

So the TakeDamage Function in the Gun.cpp is activated but it never makes it to the ShooterCharacter?

Hope this helps… I am at a complete loss now

Uploaded this post and just seen your Reply Dan.

Did you managed it with Dan reply?

HitActor->TakeDamage(Damage, DamageEvent, OwnerController, this);

You were missing the HitActor->

2 Likes

Thank Philx and DanM

Why I didn’t see that ? Another one chalked up to Experience !

Much appreciated guys

2 Likes

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms