Jump to content
Sign in to follow this  
YattaYatta

Help with AI / Transport Truck behaviour.

Recommended Posts

Here's the behaviour Im trying to get :

- AI truck with passengers inside, patrols.

- When pilot spots an enemi, he drives to it,

- When in range, driver stops passengers get out of truck & fight,

- When no more enemy is arround, passengers get back in.

There's more to it but I should be able to manage once I get the core right.

I know quite a few commands that supposedly should allow me to do that. But the best I get for now is the AI Truck driver (that received a "doMove" to my position) driving full speed in a straight line to the nearest road and stopping there. Im testing from Alti's "salt lake" flat place.

What I suppose the logic should look like :

- pilot and passengers in two different groups.

- passengers locked in cargo (to avoid them disembarking at first bullet shot in the truck)

- pilot "doMove" or "doFollow" the enemy

- when distance close enough, pilot dostop, unlock vehicle, passengers get out combat mode.

- when no more enemy, passengers get in, wait for all inside, lock.

So the main problem for now is that the pilot isnt going toward his target at all, though its difficult to give a more straightforward order than "_pilot doMove (getPos _target);" ...

Edited by YattaYatta

Share this post


Link to post
Share on other sites

Bump, starting simpler :

- How to prevent AI from disembarking a vehicle, no matter what ?

Apprently this is not enough :

_passUnit disableAI "Move";
_car lockDriver true;
_car lockCargo true;
_car lock true;

adding _passGrp setBehaviour "CARELESS"; fixed it.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×