Forums

AI help


Subscribe to AI help 4 posts, 4 voices

 

Jun 23, 2008 5:58pm

Da G man Da G man 57 posts

I have a bunch of AI units that follow a main charecter around, however in doig so they all eventually line up on each other makeing them appear to be olny one object.. which in turn looks bad. I have tried a number of ways to fix this and it won't work. I eaven took the collision code from the fps turorial and eaven that diden't work. would some one please help me.

 

Jun 23, 2008 6:03pm

Human Road Human Road 57 posts

There is an RPG Engine in yoyogames by Yal which has the solution of your problem. It is basically an RPG engine but it has the AI that you want.

 

Jun 24, 2008 1:19am

Aqua Dragon Aqua Dragon 4157 posts

One way would be to make them be able to collide into each other, like solid objects

 

Jun 24, 2008 1:30am

Philman401 Philman401 6 posts

I did on way, when they follow the hero, use the mp_potential_step function:

mp_potential_step(x,y,stepsize,checkall)

x,y - the coordinates to move towards. to follo w an object: object_name.x, object_name.y
stepsize i thnk it's like the speed
checkall - true/false. if true it will try and avoid all objects, false will only check for solid objects.



You can put true, or make all your AI solid and put true for checkall.

This is just one way to do it :P