Originally posted by Fen
View Post
Code was simple.
Event tick--->if object != Self ----> get look at rotation of object set pawn rotation to it.
I didn't know about is valid so I was just setting the target variable to the character if I wasn't locked or if the enemy died.
This way I just check ''is valid".
As I haven't found way to remove the info stored in the variable to leave it empty I still make the button that removes target lock set it to self and, left a second check "is valid and not equal to self".
Worked out perfectly.
My guess is when enemy pawns died and sent the command to set the target to the pawn self, it was probably occasionally getting the characters spawn rather than current position.
Targeting circles are exactly what I wanted.
Wasn't sure how to set them up without a whole bunch of checks and event ticks. Then getting rid of them because I was thinking of attaching them to the target actor...
Only thing I didn't see there I was thinking of using was trying get the circle to also work as health bar. I figure when I get home and really look at it, I can probably get it set with a gradient that is set to the target's HP%
Also thanks for the animation link. Was thinking about floating numbers and that looks like it will be in the right direction for that.
Leave a comment: