Hey there, in this video I will show you how to create a target lock system. Sword Asset by: Sarath K sketchfab.com/... Shield Asset by: Sergey Egelsky sketchfab.com/...
There's a bug in your TargetLock event where you're checking isTargetLocked with a Branch. In case the Branch returns false, you're setting isTargetLocked before the Sphere Trace runs. This leads to a case where you have to press the input twice to make the target lock run again if the Sphere Trace fails to find any targets. To fix the bug, you have to set isTargetLocked only after the Sphere Trace succeeds and you set the new HitActor. Other than that, this is how I learned to do target locking, so nice blueprint. Cheers!
if u change the first branch with a flip flop a will be the one connected to the sphere trace and remove the check from the b istargetlocked the and it should work
if u change the first branch with a flip flop a will be the one connected to the sphere trace and remove the check from the b istargetlocked the and it should work
If the enemy is dead, it automatically switches to an empty space until I turn it off myself, everyone who has the target system, no one has fixed this bug. Any suggestions on how to turn it off when a mob dies?
Hey there, you might have missed a bit, the code was working correctly for me I could toggle the lock on and off as many times as desired. Double-check and let me know.
if u change the first branch with a flip flop a will be the one connected to the sphere trace and remove the check from the b istargetlocked the and it should work
There's a bug in your TargetLock event where you're checking isTargetLocked with a Branch. In case the Branch returns false, you're setting isTargetLocked before the Sphere Trace runs. This leads to a case where you have to press the input twice to make the target lock run again if the Sphere Trace fails to find any targets. To fix the bug, you have to set isTargetLocked only after the Sphere Trace succeeds and you set the new HitActor.
Other than that, this is how I learned to do target locking, so nice blueprint. Cheers!
if u change the first branch with a flip flop a will be the one connected to the sphere trace and remove the check from the b istargetlocked the and it should work
nice and clean blueprint, thank you!
Glad you found it helpful
I am needs this tutorial! Thank you so much you helping me
if u change the first branch with a flip flop a will be the one connected to the sphere trace and remove the check from the b istargetlocked the and it should work
If the enemy is dead, it automatically switches to an empty space until I turn it off myself, everyone who has the target system, no one has fixed this bug. Any suggestions on how to turn it off when a mob dies?
Set a boolean for when enemy is dead and at the end, set the hit actor to false if enemy is dead
Hey man amazing tut. But I have a problem, I can lock on and lock off but If I wanted to lock on again it wouldn't lock on again. Any fixes
Hey there, you might have missed a bit, the code was working correctly for me I could toggle the lock on and off as many times as desired. Double-check and let me know.
in the beginning where there are two set is target locked you just want false checked and true not checked that should fix it if you did everything
THIS DOESNT WORK FOR ME
Because he does everything wrong and this is an example of how bug-mechanics are created in games..
if u change the first branch with a flip flop a will be the one connected to the sphere trace and remove the check from the b istargetlocked the and it should work