How do I make an NPC Follow me but not go through objects and be able to climb obstacles

This is my game that yellowish square is supposed to be the boss but first I need it to follow me but not go through the ground and be able to jump over things on its own (I have tried to make it Solid and not solid neither work, is it possible to give a cpu the skills to do that?)

3 Likes

I think @hihilogic could help you with their companion example.
Also welcome @Saad_Islam!

2 Likes

I knew it! The gods have called upon me!
I literally just made this example:

All the code’s in the dog. I can lead you through the explanation.

3 Likes

Ah ok thanks ill reply again if something breaks

4 Likes

Ah ok so this actually works rlly well but my problem is that i made semi solid platforms so it phases through them and still doesn’t jump

2 Likes

So, do you still need help? It seems like @hihilogic helped you figure it out for the most part, but I wanted to make sure.

3 Likes

yea i do need help still because the cube still doesnt jump and still treats the platforms like air

1 Like

Well if your using @hihilogic’s code then you should probably ask them, but I can help if that part is working correctly. First I’d make sure both the enemy and the platforms are solid objects, because sometimes we make silly mistakes like that which end up ruining the whole system. Once you do that let me know, because it’s probably not the case. Just gotta be sure ya’ know :laughing:

2 Likes

My jump activates by seeing if the ground specified block is in front of it. This won’t work because your platforms are high in the air. Try making another trigger for the npc to jump.

1 Like

alright i will try thank you

2 Likes