Help with enemy actions

I’m making my first real game. It’s swordfighting in the third person perspective. My problem is tha I don’t have any idea on how to make the enemy one, locate the player, two, chase the player, and three, attack. I know I’m asking for alot of info, could someone point to a tutorial that shows that type of thing tha would be great. I would prefer to get it done with the logic bricks, but I could do some minimal python if there is no other way. As a side note, I also am looking to learn about a health count and how to make a partical fire animation play in game once baked. Thanks.

heh, im working on a sword fighting game too, when I get a chance ill make you a tut/tech demo.

Well, I don’t know if I can do a tutorial exactly, but you could probably piece together multiple pre-existing tutorials. Basically, just have the enemy use a track to on the player, and forward motion so that it goes toward the player, and then if it gets close within a certain radius of the player, it attacks. Hope that helped!

Here’s the file for my AI test.

And here is a link to the topic for it.

I hope you can disect all that. You just need to add an attack thing, the models, and move all the objects to the right hight. Heh. Sorry everything is kinda jumbled up, but it was just a test. The rings are just to show the sense radius for hearing and sight. The predator cube is supposed to look at the grey cube unless it senses the prey cube but it’s not working. But yeah. Hope that helped too!

well, I made some headway. I looked at your AI example. It was a little confusing as to what was going on at first. But I figured it out. I got my enemy to follow the hero, with a near sensor with the prop ‘hero’ and track to. I put a property sensor with prop ‘speed’ and motion linv. And I gave the hero the prop ‘hero’. But now the enemy walks backwards. I tried flipping the linv direction, and he walks forward, only in the opposite diection of the hero. I guess I’m slowly figuring it out by process of elimination. I still have a long ways to go, though. I’ll keep you posted.

ok, I am really frusterated now. I’m trying to rotate the axis of my enemy character armature. I found the 3d transform manipulator and it only changes the axis in pose mode. The problem is that it only works the first time. After the second time you play the game, he resets to the old, backwards position. Is there any other way to solve this problem without making a whole new armature? At this point, I’ve already animated all the movements, and I would hate to have to redo them. I also got my enemy to swing at me and stop advancing when close to me. If I could only figue this axis thing…

Make the enemy advance only under certain circumstances, say have a property labeled “advance” and when it is equal to one the enemy moves toward you, and when “advance” equals zero the enemy stops. Then all you have to do is make near sensors to change the advance prperty. Hope that was clear dude cuz i’m fucken stoned.