Can't do damage anymore

So I was doing the lesson and as I went to test the take cover function I couldn’t do damage anymore?


This is the code I added to the BP and even disconnecting this seemed to do nothing. As this was so random I thought it was UE being itself but restarting did nothing either. The line trace also still hits like it should. I have no idea what could do this since this code was the only thing we changed outside the BT and BB stuff…

This may seem odd, but can you show your code for the line trace as well? After it hits an object, specifically.


This bit? That would be odd since I haven’t touched that in ages

It would be odd, but it never hurts to confirm.

Just to make sure I understand the problem. You cannot do damage while you are behind cover, or is it after leaving cover?

In general, the AI just stopped taking damage lol. Player character was just standing in the open, line trace hits the AI but nothing

Ok, try placing a breakpoint on the IsValid node just after the line trace and see what happens from there. What could be happening is that the line-trace is return a different actor than you’re expecting which isn’t setup to receive data.

Okay, I just a breakpoint on the IsValid node and I guess it’s working as it should? If I shoot at all it stops as soon as it hits the IsValid, I don’t even need to hit the guard. Did a breakpoint at the apply damage and it did execute that far. Other odd thing I noticed is that the guard seems to take damage as if it gets shot a few times the Blackboard goes to the take cover mode, but also are unkillable.

Edit: even more interesting the guard doesn’t take damage even from the explosive barrel we set up, it did work before

OH, I just noticed that the BP had disconnected from one point


This bit had disconnected once I put in the check to check for low HP, now it’s kinda working again

Edit:


After some checking, this seems to work like it should!

Huzah! I’m glad you found a solution.

Yep, funny enough that in the next video that part changes again… I tried it but it caused weirdness (HP only showing on top the enemy at 25) so I’ll keep mine as is

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

Privacy & Terms