Jump to content

Follow player AI


Recommended Posts

I went through the FPS tutorial by GarageGames but i wasn't able to find any docs on enemy AI. I wanted something very simple: a zombie that follows the player and melee attacks him. Do i have to generate a navmesh, like in Unity, or is it pure, using A*? Is there something built into the engine for this?

Also, how do i make the AI networked? So another player in the server can also kill him.

Link to comment
Share on other sites

Start with the RTS Prototype - that'll get you making AIPlayer objects that you can control. http://www.roostertailgames.com/TorqueRef/content/documentation/Scripting/Advanced/RTSPrototype.html

Also, look at the AI Tutorial scripts : https://github.com/RichardRanft/AITutorial - they'll show you one way to make your units think, attack, work in teams, and communicate.

Recast/Detour is built into T3D - so you have a nav-mesh available if you need smarter pathfinding. The way the tutorials are set up the units will run into stuff and get stuck sometimes, but if you generate a nav-mesh and use it to generate paths, then tell the units to follow those paths, you'll be good to go.

AIPlayer is networked automatically - you create the unit on the server and everyone sees it. It's magic (unless you really want to spend some time reading networking code....).

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...