No one is taking any damage and again I'm clueless

I have been through the lecture many times and I fail to see what I’m doing wrong. The Collision mechanic in the projectile is working but the “Event Any Damage” is never firing.

The code is at https://github.com/Raymon-H/S05_TestingGrounds.git

P.S. I don’t know if this is related, but a number of assets seem to be AWOL. Cross hairs are missing, firing sound is gone, filing animation of the player is absent…

Working fine to me. How are you testing that it fires? Your log message comes out fine.

1 Like

I forgot the most basic solution, shut down the editor and restart it. The log message was my proof that it didn’t fire. I tend to avoid restarting as it takes 10 mins or so to start.

Hello Dan
I am trying to ignore Instigator when firing, but it’s not work

As I search it require to indicate instigator in SpawnActor<>() function, but I can’t do it, because Gun is a child Actor not a component and can’t moving upward and get Owner Class

ForDan01

can you advise anything ?

You can set that after you spawn the gun

Gun = GetWorld()->SpawnActor<AGun>(GunBlueprint);
Gun->AttachToComponent(Mesh1P, FAttachmentTransformRules(EAttachmentRule::SnapToTarget, true), TEXT("GripPoint")); //Attach gun mesh component to Skeleton, doing it here because the skelton is not yet created in the constructor
Gun->AnimInstance = Mesh1P->GetAnimInstance();
Gun->Instigator = this;

yes I can do it for the Player
but How can I do it for ThirdPerson. we have not ThirdPerson C++, only Blueprint.
Is there anyway to do it with out C++ ?

They’re eventually combined though.

I tried it and it’s work for Player but not ThirdPerson and it’s logical because we passed Instigator reference only into FirstPersonCharacter Class.

Have you not gotten to the lecture where the same class is used for both FP and TP?

Ah! I am now in 285 Lecture and Merging FP and TP is 295
Thank you Dan

Privacy & Terms