Game Development Community

Walking bots with a followPath method

by JeongWook Son · in Torque Game Engine Advanced · 10/20/2009 (3:47 pm) · 1 replies

Hi,

I am trying to make a bot walking along a path.

Below is my code to create an aiPlayer and to make it to follow a path
%worker1 = AIPlayer::spawnOnPath( "Worker1", "MissionGroup/path1", "PilotCasualMale" );
%worker1.setActionThread("walk", false, true);
%worker1.setMoveSpeed(0.2);
%worker1.followPath("MissionGroup/path1", -1 );

I think I am almost done due to many helpful threads in the forum but whenever it is called to follow a path it returns to running instead of walking (I think running is default but I don't know how to change it).

In particular, in game development environment, a bot walks by calling each line of code at a time. However, if I add lines in my project file at the same time, a bot doesn't walk.

Anyone has thought to figure it out?

I appreciate any help.

#1
10/20/2009 (8:50 pm)
I dont know if your looking for something like this or not.

www.modernpaintball.net/images/botmenu.jpg
If this looks like something that might work for you, i will talk to the guys in our group to see if i can release this for community use.