Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » [NEED HELP] Enemy AI for Maze
- sdghuirtui
-
Scratcher
5 posts
[NEED HELP] Enemy AI for Maze
So I'm making a horror-like game where you have to find your way around a maze and there is a monster chasing you. At present it only chases you if you see it in the torch, and then it runs after you. But it only goes through walls. I need an AI or a pathfinding script to make it idle, wander around, and then make it chase the player down without having to go through walls when it enters that mode.
HELP PLEASE!
HELP PLEASE!
Last edited by sdghuirtui (May 29, 2024 15:12:53)
- invalidaccess
-
Scratcher
100+ posts
[NEED HELP] Enemy AI for Maze
i've never seen something like that in scratch before
just probably because it's waay hard to do that
even best scratchers couldnt reach that point
you might not make it but maybe you can fake it
like a fake ai
so i'm assuming the game is dark and you cant see more than a certain distance
make the monster only appear in some times behind you
that gives the effect of someone following you
or make it visible only in specific part of the map
just probably because it's waay hard to do that
even best scratchers couldnt reach that point
you might not make it but maybe you can fake it
like a fake ai
so i'm assuming the game is dark and you cant see more than a certain distance
make the monster only appear in some times behind you
that gives the effect of someone following you
or make it visible only in specific part of the map
- invalidaccess
-
Scratcher
100+ posts
[NEED HELP] Enemy AI for Maze
OR! you can use griffpatchs pathfinding codes
it works but dont use with the scrolling games it crashes
it works but dont use with the scrolling games it crashes
- Koamodo975
-
Scratcher
1000+ posts
[NEED HELP] Enemy AI for Maze
So I'm making a horror-like game where you have to find your way around a maze and there is a monster chasing you. At present it only chases you if you see it in the torch, and then it runs after you. But it only goes through walls. I need an AI or a pathfinding script to make it idle, wander around, and then make it chase the player down without having to go through walls when it enters that mode.For the different phases, you can just use randomizing for basics; for more complicated things, you'd probably make it randomly switch between idle and wandering; if it gets within range of the torch or some other factors, there'd be a high chance of it chasing. As for pathfinding, I don't know how to do that, but you should make the map out of wall and floor tiles; if it detects a wall tile while wandering, it would turn randomly; for chasing, like I said before, I have exactly no idea how to code pathfinding AI, but you could try cheating it by making it track the tiles the player moves over.
HELP PLEASE!
- Discussion Forums
- » Help with Scripts
-
» [NEED HELP] Enemy AI for Maze


