- Home /
How to make simple AI?
This for some might be asking a lot, but I'm making an fps game and all I have left to do is the ai. The problem is is that I don't know how to make them have any intelligence. If someone could help me, and maybe provide me with a script, all I want is where there is a trigger in front of the enemy and if my guy walks through it than the enemy will attack, and they only shoot, and the health needs to be in there too. Sombody please help.
Answer by Commander Quackers · Dec 11, 2013 at 04:52 AM
There are many tutorials for this on YouTube.
What you want to use is OnTriggerEnter() and then inside that function, figure a way to make it so that the enemy will transform towards the target along Vector3. The target can be simply defined with a variable at the top of the script.
Thanks for the help. With using youtube like I am I can just pretty much make my own.
Answer by flaviusxvii · Dec 10, 2013 at 10:55 PM
That doesn't work with my game because other scripts are needed for my character that I don't want. And I still don't know how to create a AI script, that video didn't really help much.
Your answer
Follow this Question
Related Questions
The name 'Joystick' does not denote a valid type ('not found') 2 Answers
Basic AI script. need help. 1 Answer
How to remove z axis control from script 1 Answer
ai navigation help 0 Answers
Enemy AI With changing Player 0 Answers