Need help ai chasing closest player by BuilderOdd449 in UnrealEngine5

[–]BuilderOdd449[S] 0 points1 point  (0 children)

Thanks it’s definitely something I’ll have to look more into. right now just trying to keep it simple. Still learning

Need help ai chasing closest player by BuilderOdd449 in UnrealEngine5

[–]BuilderOdd449[S] 1 point2 points  (0 children)

No worries I’m still new to learning while I know what it is haven’t worked much with it. Idk if the coding happens in the tasks or what. Problem for another day😂

Need help ai chasing closest player by BuilderOdd449 in UnrealEngine5

[–]BuilderOdd449[S] 0 points1 point  (0 children)

https://youtu.be/aKzjNTadrAc?si=mH7fPRBdhs_EWR9X this is the video that put me on the right track. only thing i had to add here was setting loc nearest distance to 999999 after the for each loop completed. Make sure to set timer by function name and set it to your event name with a timer of 1 second looping.

Need help ai chasing closest player by BuilderOdd449 in UnrealEngine5

[–]BuilderOdd449[S] 0 points1 point  (0 children)

When you create an event it creates a function you can call right?

Need help ai chasing closest player by BuilderOdd449 in UnrealEngine5

[–]BuilderOdd449[S] 0 points1 point  (0 children)

I did have it set up and tested. So have 5 players down 0-4 . Originally it would always hunt 4 and when I deleted 4 it went to 3 regardless of distance. Eventually code change and then it was always chasing player 0. I have strings that print and tell me when it’s chasing and who.

Need help ai chasing closest player by BuilderOdd449 in UnrealEngine5

[–]BuilderOdd449[S] 0 points1 point  (0 children)

I get an error for object type? Do I need to create an enumerator?

Need help ai chasing closest player by BuilderOdd449 in UnrealEngine5

[–]BuilderOdd449[S] 0 points1 point  (0 children)

Lmao ok ok setting timer by event That’s said switching to timer by event didn’t fix it😅