Jump to content
Sign in to follow this  
DeclaredEvol

Bus script, letting off AI.

Recommended Posts

I've tried organizing waypoints for a Bus script, where the Bus Driver will stop and let a person off at a 'specific' bus stop. There would be more than one targeted location where they'd be let off. But for some reason the Bus Driver will not let off a person at a time, instead he will let them all off at the same spot. I would be using Transport Unload but the problem is unfortunately that everyone is dropped off at once.

I tried synchronizing the get out of the AI to the Transport Unload, or even the AI to the Unload. But it still makes everyone get out, and on the contrary... the Unload Waypoint does not do anything even with synchronization. I am wondering if it is possible to let people off specifically at more than one location?

Share this post


Link to post
Share on other sites

name your passengers and use

[url="http://community.bistudio.com/wiki/unassignVehicle"]unassignVehicle[/url] unitname;

in bus driver waypoints.

you can also just pick random number or random passengers and unassign them from the crew array and make sure they are not driver instead of naming them if its no particular need for full control, creates some randomness.

place this code in bus waypoints and it will dropof 1-3 random selected units.

_null = this spawn {
_veh = vehicle _this;
_crew = (crew _veh)  - [(driver _veh)];
_getout = ceil(random 3);
while {_getout > 0 AND (count _crew) >= _getout} do {
	_passenger = _crew select (random(floor(count _crew)));
	unassignVehicle _passenger;
	_crew = _crew - [_passenger];
	sleep 1;
};
};

Edited by Demonized

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  

×