the AI walks wround until it “see’s” the character then it shoots and if the health is low it should run. also if it is shot at i want it to do a search looking for the closest object with property “Hide” once it reaches this point it should continue to shoot.
no need to post thousands of "?"It can be done without python…
Just make the enemy some patrol animations which he would play and when player is near enemy it will attack… I think I will make an example blend file soon…
Good AI would definately need Python scripting. Even basic AI will leave you with a messy web of logic bricks which are hard to maintain.
You should plan out your AI in detail before starting on the code work. It’s often more complex than you think.
For example “running away” will need collision detection and basic pathfinding abilities to not look completely stupid. How will these be handled? What happens when it looses sight of the player? Does it return to it’s waypoints? How far from its position will it chase the player?
Just a few things to think about before you start coding it…
Heh, Andy83 is right. Good AI should be done with python.
also i cant script for poopie
Hmm, since you don’t know python scripting, Xintoc’s way would work ok for you. Not sure what he has it in mind, but most likely everything will have to be specific to that level. AI could be a bit complicated, but python makes it a lot easier to do.
Use Xintoc’s way if you need the results now, but you should start learning some python since it’ll be of great help when making games in the future.
Most people here would say: “Use Python”, but it can be done using logic too.
The hard part, is thinking about how complicated can I make the logic bricks. A while ago I was totally in for making some good ai’s, detecting walls, jumping and much much more. Even let them fly on certain places.
Ai is archiveable with:
ray sensors (instead of collision sensors used in the blend)
properties
near, touch and some another sensors.
extendable with python.
Here a Blender 2.25 file, didn’t get the time yet to convert, but you can take a look at it. It’s a simple racing ai I did a couple of years ago. http://212.123.169.51/files/racing_ai_more.zip
Controls:
arrow = steering/forwards/backwards
1 and 2 = switch camera 1 = player, 2 = 1 ai player