Enemy AI help..

Hi guys, just wanted to say before I start that Im sorry if this is a rather large request, Im an ‘artist’ (air quotes) and so I cant really do coding, but Im slowly trying to learn around my current stuff going on. Also, if you cant help me yourself, a link to an asset store thing that can do what I want without coding is absolutely fine…

Okay, so now we got that out the way, Im trying to create some enemy AI and Im having a lot of trouble, I was wondering if you guys knew any, or even if your feeling generous write me, or find me an asset store link to, an AI script. Its somewhat basic, so at least thats something.

Okay, so I need it to patrol randomly in a formation (I guess this could be done by grouping units in an empty gameobject and keeping them in the order I placed them in originally, but what do I know). By randomly, I mean without waypoints, so they just walk around the map at random. But when they come close enough to one of 2 types of enemies (So I want them to attack the player, but also another army, so they need to attack both), which one they attack I dont mind whether its random or whose closest, I gotta give you some leeway. Because of the attack, it needs to have a basic health and shooting system, where each one unit fires 1 shot every 10 seconds ish (its supposed to be very slow, its a musket), and if even better if they run into the enemy and melee attack if within a certain range. It doesnt need any animation system or anything, just what I said above. So far, I just have a third person controller for the player, so if it needs a corresponding script to work with the player for health and being shot, just have that as a basic health system and so it shoots every 10 seconds when clicked.

Sorry for the high demands, as I said Im lost when it comes to coding but I want to make this game, and I’d rather do it alone (being in a team forces you into a certain commitment, and I dont have the time or the confidence in my own skill for that at the moment).

Thanks so much for any input

There are a whole heap of tutorials out there (ones that take you through the whole process even!)

How much coding can you do? A lot of the tutorials will take you through the basics.
If you want to do it from scratch yourself, http://unitygems.com/ is a good reference (as is “unity fps tutorial” google search - heaps of vids, other resources, look through unity answers can help too)

http://unitygems.com/quaternions-rotations-part-1-c/
then
http://unitygems.com/fsm1/
(continue the series from there)
http://unitygems.com/basic-ai-character/

The alternate is to use already made solutions;
eg.
http://forum.unity3d.com/threads/167791-RAIN-indie-Free-Powerful-AI-Engine-Released
also there are FPS kits etc on the asset store.

You can always just throw it out there in collaboration to see if anyone else is interested in a lower commitment project with you. Do you have art assets already?

The issue is, Im doing it for a game jam styled thing Im doing this weekend, so I dont really have the time to learn all sorts of stuff. Thanks for the help for when I do get round to learning it though :slight_smile:

Heres a link to a YouTube video. This guy is really good at teaching others how to script and such. He taught me all I know. Heres a video on how he makes his simple Enemy AI. I recommend starting his YouTube series from the beginning but thats totally up to you. Heres the link

Yeh I do like series, but that just gets it to follow the player

Have a look at the last link I sent then - it has a pretty good and flexible AI solution.

Or… if you want to have more of a ready made solution (I haven’t tried this)

Tutorial: