PDA

View Full Version : NPC Pathing for dummies.


DeletedUser
04-03-2002, 09:52 AM
while curx isn't equal to newx
{
xold = curx;
xnew = (whatever the hell you would do to pull the x out of the line);
time = (whatever you would do to pull the time out);
xmove = (xnew - xold) / time;
while (a < time) do {
xthis = xold + xmove;
}
<repeat this for y and z>
move.npc (xthis, ythis, zthis);
}



This is slightly basterdized code... as in nothing like C++, but as soon as i get it into c++ it'll be pretty nice.

Merkur
04-03-2002, 09:56 AM
try to use this.. (http://www.amazon.com/exec/obidos/ASIN/0789718162/ref=pd_sim_books/002-5834863-2293635) :D