Game Development Community

Follow a path question

by JD Scogin · in Torque 3D Beginner · 10/25/2013 (3:58 am) · 3 replies

I created a Demo player and have him follow a path. That works fine. But when I create a Demo player using a difference model, it moves to the path but does not follow the path. I have tried several different was with the same results. Is it because my model does not have the correct animation? I would that that would not matter, but I could be wrong.
Thanks

#1
10/25/2013 (7:14 am)
make sure u r new aiplayer have an "onReachDestination()" function under it's datablock namespace.


assume,
u r ai's datablock name:
"xxx"

then u have to have an function like this:

function xxx::onReachDestination(%this,%obj)
{
//here copy paste everything from "demoPlayer::onReachDestination(%this,%obj)"
//which is located in game\scripts\server\aiPlayer.cs
}

#2
10/25/2013 (8:56 am)
Brilliant! Works great! Thanks Much! (Sometimes, you just have to ask)
#3
12/06/2013 (5:57 pm)
@JD Scogin im building a team for a couple of torque games you want in? add me on skype murrdy17