I tried looking into this, and i could not find any tutorials on AI except here: http://blenderartists.org/forum/showthread.php?t=100512. And i found out how to make an enemy go on a path and if the player gets to a certain distance the enemy will follow, but if you get away from a enemy the enemy will go back to the path.
But is there any other things besides this? besides path finding?.
You could use python…
But if you dont know python… thats your best bet.
OK, a little more specifically than “use Python,” I would set up the AI so that there are two main “modes” it uses. The first is pathfinding, like you’ve already been doing. That would be when the AI doesn’t detect the player. When he does detect the player, pathfinding turns off. Instead, you can program a sort of advanced track-to script, depending on the type of game. For example, in an action game, maybe the enemy follows the player only until a set distance, then moves in to attack at random intervals, before jumping back to that distance. In a shooter, maybe the AI first searches for cover, attacks randomly from there, and then at a random time, move forward to charge the player or find new cover. Maybe you can give the AI a random chance at retreating. Basically, whatever you do, use the random actuator… a lot. Free-roaming AI is more complicated than a path-finding one, but if you mix the two together, you can get away with simpler scripts, relying mostly on tracking the player and performing actions depending on the random value of an integer property.
Hmmm…thank you Magnum Opus. That was very well written i liked it. Soo…you say a Random actuator will do it, possibly some propertys…so is there any tutorial on any of this? I mean anything besides path finding is fine…maybe more enemy movement like you mentioned.
I don’t know of any tutorials on this, but, again, it’s really just a more advanced version of “track to.” One thing you might try would be using states. For instance, in one state, have the AI programed to follow a path, in another state, have it track to the player, in another, it takes cover, moves laterally, attack, whatever actions you want it to be able to do. Then use the random actuator to give you a random property value, and switch states depending on that value, and whatever other criteria you want.
Hmm interesting…thank you for replying. ANd have you actually tried all that before?