Guard is walking first if it is not adjacent to the player

My Guard was working ok but suddenly it stopped running unless it first walks to the player and bumps to the player, after which it starts to run. If I place the PlayerStart far away from the Guard, the Guard will first instead walk to the player rather than starts to run immediately.

This is my BT_Task_ChasePlayer

And this is my Run interface event
run event

What could I do to make the Guard run again as soon as the game starts?

Hi and welcome to the community.
The guard is supposed to walk until it detects the player. You change the movement speed on the guard to 150 from 600 when you make the copy of robber. The run then sets it to 500 to give you a little bit of speed over them.

So, when you walk in front of the guard, your chase task should trigger and the chase should trigger the run, setting it to 500. I hope this makes sense.

Hmm, I see. I tried to also do the AI Perception lesson a bit later from here but ended up backtracking because I wasn’t sure if I was doing everything right.

Is the detection also supposed to start with the guard walking and only starting to run after it reaches you for the first time?

Walking is the starting state, or idle if you don’t have waypoints. On player detection The guard should run to you and you can tweak the detection range and angle. This should set a blackboard variable, has seen player or something along those lines, which changes the path on the BT to chase.

When doing this section, don’t rush. Take your time and don’t try run before walking ( :smiley: ). Follow it from start to end and you should get it right. I missed a few things myself here and had to go review them all a couple of times at the end of the course - it is easy to miss a couple of the key settings.

Understood! :slight_smile: Thank you for taking the time to clarify the section to me, I think I initially assumed that the guard should run all the time because initially my PlayerStart was placed very close to it. But I’ll keep on working the section step by step as you suggested and hopefully it will all turn out as it should in the end. :slight_smile:

1 Like

Just take your time and if you see something that doesn’t behave as you expected, you will have missed something and it is always something easy to miss but hard to find. We are here to help so give it a good try first and ask if you’re still confused.

Good luck.

1 Like

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

Privacy & Terms