I’m trying to make the pathfinding AI work like Baldi from Baldi’s Basics, however I can’t seem to be able to make it stop. It stops only when it catches the player. Here’s the code:
I don’t know if I did something wrong, but if I did please explain why
I don’t know what Baldi is. Can you describe what you want to happen?
If your desire is to base the movement on distance. Then this would work.
(ignore the reversed sequence order in the distance check. I was testing something)
Unless there’s something cropped off, the 2nd wait does nothing. Wait actions delay actions after the wait in the same event and subevents. If there aren’t any direct events then there’s nothing to resume.
Your events don’t have any conditions. So, it sets the speed on every frame but the wait creates a delay that sets the speed to 0 when the time expires.
It might be as simple as adding a condition that checks the distance between the objects.
This is creating a bit of chaos. The wait creates a delay and triggers the other events out of sequence in between frames. It also allows events to be process that would normally be canceled each other out if executed in the normal sequence.
Without any conditions, waits become more like a delay that causes events to happen out of sequence.
Sorry, but you didn’t show me what I wanted to do. Baldi slaps his ruler, moves, and then stops for a certain amount of time. If you didn’t understand the explanation search up a gameplay of Baldi’s Basics. At least you tried to help tho
We’re trying to help. I gave you an example. It’s not my job to search for further information to answer a question. That feels like homework. We’re all using our free time. We want to use it efficiently without having to guess what’s needed or Google something. I also tried to explain why it’s not working.
If it’s a concept that’s difficult to explain, it would be helpful to paste a link to a video or insert an animated gif.
To do as you said. I would use an object timer instead of wait.
I don’t like giving answers. I like to help and teach. I feel like I still don’t have all of the details.
Something like this might work. There are multiple ways of doing things. This might need tweaking.
I’m adding a screenshot because it would be tougher for me to try to explain it.
If the character is supposed to wait after slapping the you could add another timer or maybe a wait as long as it uses a trigger once.
Something like this.
IDK. The last animation lines might not be needed. It depends on if you want to set an idle state after the slap. You could add an action to change the animation.
2 Likes
Exactly what I needed! Thank you so much!
1 Like