Jump to content
Churizo1

Return players to base script

Recommended Posts

params ["_start","_veh"];

_veh setVelocity [0,0,0];
_veh turretUnit [0] setPos (_start getRelPos [2, 180]);
{_x setPos (_start getRelPos [2, 180]);} forEach ((fullCrew _veh) apply {_x select 0});
{_x setPos (_start getRelPos [2, 180]);} forEach (nearestObjects [getPos _veh,["Man"],15]);
uisleep 0.2;
if (alive _veh ) then { deleteVehicle _veh } else {};

I'm trying to move everyone out of a vehicle as well as everyone close to the vehicle. The script above works mostly. However for some reason copilot seats never get moved out of the helicopter. 

 

I added "_veh turretUnit [0] setPos (_start getRelPos [2, 180]);" in an attempt to get the copilot seat but no cigar. 

 

I have no idea why only the copilot seat doesn't work (even on vanilla vehicles). 

 

Does anybody know what is going wrong here?

Share this post


Link to post
Share on other sites
_veh setVelocity [0,0,0];
private _units = nearestObjects [getPos _veh,["Man"],15];

{
	private _unit = _x select 0;
	moveOut _unit;
	_units pushBack _unit;
} forEach (fullCrew _veh);


{_x setPos (_start getPos [2, 180]);} forEach _units;


uisleep 0.2; 
if (alive _veh ) then { deleteVehicle _veh };

Untested

 

If that still doesn't move the copilot try adding

{_units pushBackUnique _x} forEach crew _veh

 

  • Like 2

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

×