Jump to content
pcc

Delay deleting ejected pilot

Recommended Posts

Adding sleep returns generic error.  

crew _vehicle apply {
_x addEventHandler ["GetOutMan", {
params ["_unit", "_role", "_vehicle", "_turret"];
	deleteVehicle _unit; 
}];
};

 

Share this post


Link to post
Share on other sites
30 minutes ago, pcc said:

Adding sleep returns generic error.  


crew _vehicle apply {
_x addEventHandler ["GetOutMan", {
params ["_unit", "_role", "_vehicle", "_turret"];
	deleteVehicle _unit; 
}];
};

 

 

You should use foreach instead and spawn to allow sleeping:

 


 

{
_x addEventHandler ["GetOutMan", {

_this spawn
{
params ["_unit", "_role", "_vehicle", "_turret"];

sleep 5;  
deleteVehicle _unit; 

};
}];

} foreach (crew _vehicle);

 

 

 

  • Like 1

Share this post


Link to post
Share on other sites

yes, but;

- rather use: objectParent _unit deleteVehicleCrew _unit;

The getOutMan EH will fire for each ejected crew

 

Disregard; That don't work!

 

 

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

×