Jump to content

Recommended Posts

Hi there...

 

I want to delete the USS Liberty after a cutscene.

I give it a name like "A1" and run a script with the "deleteVehicle A1" command. It didn't work.

I put everything in a layer and call it "Liberty" and run the script with the " _Liberty = ((getmissionlayerEntities "Liberty") select 0); {_x enableSimulation false; _x hideObject true} foreach _Liberty;".

Everything else is deleted but the USS Liberty is already there. How can I delete it after my cutscene???

Share this post


Link to post
Share on other sites

The Liberty is actually a composition, not a single object, though it presents as one in the editor. I found this snippet on reddit and it seems to work just fine - I used your example var name of "a1":

_liberty_parts = getArray (configfile >> "CfgVehicles" >> "Land_Destroyer_01_base_F" >> "multiStructureParts");
{
	_part_class = _x select 0;
	_part_vehicles = nearestObjects [getPos a1, [_part_class], 100];
	{
		deleteVehicle _x;
	} foreach _part_vehicles;
} foreach _liberty_parts;

Not sure if there's a better/simpler way.

 

 

  • 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

×