-
AI Help
Hey thanks for reading this! I have a top down shooter where the enemy goes and finds you and when it does it chases you down. I know how to use AI by shooting a bunch of invisible objects that when hit the player tells the enemy to chase the player. Is there any other way without using a lot of objects?
-
Re: AI Help
Maybe you want pathfinding and line of sight? All you have to do is make the enemy go to the last place it saw the player, and then after that either attack the player or wander around looking for them.
-
Re: AI Help
-
Re: AI Help
Hi LBPO8. I have a node example on my website that may help you with your first post..
Marv
-
Re: AI Help
Do what? Line of sight, or pathfinding? LOS you have to make your own method based on the way your gameplay is, but pathfinding is pretty easily done if you use one of the 3 extensions for it.
-
Re: AI Help
I know, but do you have an example of the way you do it?
-
Re: AI Help
@OldLongDragon: Most extensions, and the one I am referring to, are free and easy to understand and use. Like opening a jar of jelly, you know how to do it and how to use whats inside.
@LBP08: There's no 'way I do it', I just know how to if I need to. Anyway, what part do you not understand? The LOS or the Pathfinding?
-
Re: AI Help
The node example was good, but not what I'd like. What I'm using now is that it looks for you by shooting objects when the object hits you it chases you, but you can hide behind walls and the enemy will walk right past. The downside of what I'm using is that there are too many objects shooting. I'd like the same thing without there being to many objects.
-
Re: AI Help
OK, so really you can just make the enemy a sort of bouncing ball, and they just walk around randomly. Then when they see the player, you set their direction to the player.
To determine if the enemy has LOS of the player you can use a scaled and rotated line that you stretch between the enemy and the player and check for no obstacle overlap.