Nobody is going to be able to give you this one... AI can be simple or complex but can almost never be copy pasted from one project to another unless you are making a clone or sequel to a game you have already created.
Start by thinking in very general terms and making a short list, then expand on each point in the list.
If the actor is a monster and you want it to attack the player, your list might look like: 1. monster sees player 2. monster moves towards player 3. monster attacks player
Now we need to expand on part 1, how does the monster see the player? probably based on distance, but can the monster see through walls. Does the player have any abilities or items that can make the monster not see him? Can all monsters see the same distance?
Unfortunately it takes quite a while to try to think through, but you have to do it one step at a time and make one rule at a time as you decide what exactly you need the actor to do.
The kind of AI you need totally depends on the specific game you are creating, if you want even any idea's to help you along you're going to need to supply a lot more information than what you have so far.
Comments
Start by thinking in very general terms and making a short list, then expand on each point in the list.
If the actor is a monster and you want it to attack the player, your list might look like:
1. monster sees player
2. monster moves towards player
3. monster attacks player
Now we need to expand on part 1, how does the monster see the player? probably based on distance, but can the monster see through walls. Does the player have any abilities or items that can make the monster not see him? Can all monsters see the same distance?
Unfortunately it takes quite a while to try to think through, but you have to do it one step at a time and make one rule at a time as you decide what exactly you need the actor to do.
Guru Video Channel | Lost Oasis Games | FRYING BACON STUDIOS
http://jamie-cross.net/posts/ ✮ Udemy: Introduction to Mobile Games Development ✮ Learn Mobile Game Development in One Day Using Gamesalad ✮ My Patreon Page