Results 1 to 3 of 3

Thread: Bus script, letting off AI.

  1. #1

    Bus script, letting off AI.

    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?

  2. #2
    Try to use a "MOVE" wp synchronized with a "GET OUT" wp.
    =BTC= Col.Giallustio
    Italian Tactical clan

    All my works

  3. #3
    Warrant Officer Demonized's Avatar
    Join Date
    Nov 16 2010
    Location
    Back from afk 2013
    Posts
    2,614
    name your passengers and use
    Code:
    unassignVehicle 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.

    Code:
    _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;
    	};
    };
    Last edited by Demonized; Dec 13 2011 at 14:54.
    My scripts:
    Spoiler:

    what to do when posting any kind of code dammit!!

    Any new mission editor or scripter in Arma2 should have read Mr Murrays Editing Guide Deluxe at least once, it still applies for A2 even though it was made for Armed Assault.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •