how do i use to AIPlayer.cs that is made when a new project is made
by Brian · in Torque 3D Professional · 10/25/2011 (12:22 pm) · 1 replies
how do i use to AIPlayer.cs that is made when a new project is made i have tryed SpanwShere playerdroppoints and look all over manuals and i cant figure it out
About the author
Just starting I have nothing to tell you
Associate Michael Hall
Big Kid Games
- From within the Editor you'll first create the Paths SimGroup: Library -> System -> SimGroup -- name it Paths.
- Then you'll create the path object under the Paths SimGroup: Library -> Level -> Level -> Path. Make sure this Path is named Path1 -- the AIManager looks for this when it spawns the AI.
- Now making sure that you are creating them under the Path1 group place any number of path markers, making a route for your bot to follow: Library -> Level -> PathNode -- if memory serves the marker numbers will automatically increment as you place them .
- Save the mission, exit, and you're almost ready.
I'm assuming you used the Full Template so the AiManager needs to be enabled:The AIManager is commented out inside of function GameCore::startGame() in gameCore.cs. You'll need to re-enable these lines:
// Start the AIManager new ScriptObject(AIManager) {}; MissionCleanup.add(AIManager); AIManager.think();And inside of endGame() you'll need to do the same so that the AiManager is deleted and cleaned up at the end of a game:Now when the mission is run, an AI object will be spawned using the "DemoPlayer" datablock, and will begin to run the path you placed in the Editor for this mission. Any further functionality for AI will have to be scripted by you.