Alternative solution to the Aiming

Maybe something I haven’t thought of, but why not just set this at the same time when sight has been updated? I could guess as we want this decision on an on tick basis, but some food for thought or discussion.

That’s exactly what I thought as well. I’ve been trying Sam’s method with get focus actor but for some unknown reason, it just doesn’t work. Am I missing something?

Your solution with break ai stimulus makes a lot more sense to me (And it also works)

Hi Odebla,
Also maybe it’s useful to know that later on in the lectures Sam strips out the code here that is set OnTick, so I’d say if it works for you now then maybe worth keeping it like that. Would be good to know of course why it’s not working for you… what errors are you getting? I think one of the challenges with this course, to some extent for the instructors is that unreal seems to change a fair bit, I started this on 4.19 so although not many, there are some deviations from the course.
Cheers

Hi thanks for the reply. I’ll be keeping the code. As for Sam’s code, it’s just that when I check the validity of the object I get from “get focus actor”, I’m simply getting false in return (i did a print out to check), and it doesn’t change when the enemy detects me either.

Privacy & Terms