Well it works like you make a few "waypoints" (objects to tell your charecter or whatever it is where to go) and have your object follow them in order to make a path
Example
//Make sure we have some variables for the waypoints
#include "DarkGDK.h"
int objy[10]
int objx[10]
int objz[10]
//an Array that holds 10 waypoints X,Y,Z positions so your object knows where they are
int currentWP = 1;
//so we know where we are
void FollowPath(int object, int waypoints)
{
//if were not on a waypoint, head to the next one
if(currentWP == 0)
{
dbPointObject(object,objx[currentWP+1],objy[currentWP+1],objz[currentWP+1]);
dbMoveObject(object,5);
}
if(dbObjectCollision(object,waypoints))
{
currentWP++;
dbPointObject(object,objx[currentWP+1],objy[currentWP+1],objz[currentWP+1]);
dbMoveObject(object,5);
}
//If we have found another, keep going
if(currentWP > 0)
{
dbPointObject(object,objx[currentWP+1],objy[currentWP+1],objz[currentWP+1]);
dbMoveObject(object,5);
}
}
you'll need to create some waypoint object(s) these can just be a few hidden plains if you want
then youll have to assign each var to a position
like so
void AssignStuff(int wpobj)
{
dbPositionObject(wpobj,objx[waypointnumber],objy[waypointnumber],objz[waypointnumber]);
}
youll have to do this for each of your waypoint object(s)
and then finally youll need to put them wherever you want him to go
a good way to figure this out is to dbPrint your X,Y,Z and open notpad and walk around your level and take down the values
then finally apply them like so
void AssignMoreStuff(void)
{
objy[1] = 10;
objx[1] = 210;
objz[1] = 450;
//just example values
}