Horror AI

Started by
15 comments, last by KnowItAllGames 6 years, 10 months ago

Im looking for an AI for a monster to be able to walk around and jump scare you when it finds you! Need help please 

Also i use C# and Unity

Advertisement

Start simple, make a monster that exists (and does nothing).

Then gradually expand things in small steps:

- let it walk around randomly

- let it detect the player nearby

- let the player know the monster found him/her (or maybe not, if you want to surprise the player)

- pop up in front of the player (or whatever it should do to scare you).

2 hours ago, Alberth said:

Start simple, make a monster that exists (and does nothing).

Then gradually expand things in small steps:

- let it walk around randomly

- let it detect the player nearby

- let the player know the monster found him/her (or maybe not, if you want to surprise the player)

- pop up in front of the player (or whatever it should do to scare you).

Yeh thats the thing you see im having trouble with the script to make it walk around randomly and making a jumpscare but i guess thats a whole other thing to work out

41 minutes ago, KnowItAllGames said:

Yeh thats the thing you see im having trouble with the script to make it walk around randomly and making a jumpscare but i guess thats a whole other thing to work out

Walking is easy. If you use Unity then use a script to transform the location.

Next you should place waypoints on a level map, then by moving the monster using a script you target the waypoints. If it's a strait path then there will be no need for complex collision detection.

If you want more complex movement you need to read up on path finding. For your game the simple strait move will be enough.

38 minutes ago, Scouting Ninja said:

Walking is easy. If you use Unity then use a script to transform the location.

Next you should place waypoints on a level map, then by moving the monster using a script you target the waypoints. If it's a strait path then there will be no need for complex collision detection.

If you want more complex movement you need to read up on path finding. For your game the simple strait move will be enough.

You see its set in a forest and i would like my monster to just wander the forest aimlessly until it gets in range of the player(Its not a huge forest)

Check the Unity NavMesh for this, remember that when you downloaded Unity it also downloaded the manual and scripting guide. All these things you are looking for is explain in there; keep them open at all times while working with Unity.

 

Now when it comes to navigation meshes Unity is limited, however it has all you will need for a game like yours.

Do you have any code to show? Well, first thing did you do pathfinding? It will follow a path and you randomly generate a number for the path you want him to choose, if it see the player then you can make it automatically run to him or jump scare him or you can generate(again) a random number to tell if it has seen the player. If your code doesn't work I can fix it. 

1 minute ago, Binkiklou said:

Do you have any code to show? Well, first thing did you do pathfinding? It will follow a path and you randomly generate a number for the path you want him to choose, if it see the player then you can make it automatically run to him or jump scare him or you can generate(again) a random number to tell if it has seen the player. If your code doesn't work I can fix it. 

I've actually just created the NavMesh but im not sure how i get my creature to roam the NavMesh do you think you could help?

also what kind of code would you like me to show you?

Just now, KnowItAllGames said:

I've actually just created the NavMesh but im not sure how i get my creature to roam the NavMesh do you think you could help?

also what kind of code would you like me to show you?

Do you have code that you try to make it work? 

1 minute ago, Binkiklou said:

Do you have code that you try to make it work? 

No honestly im clueless as how to make this work.

This topic is closed to new replies.

Advertisement