OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting Multiplayer => Topic started by: st3a1th on 07 Feb 2009, 19:06:25

Title: Can anyone help
Post by: st3a1th on 07 Feb 2009, 19:06:25
Hi

I am not very cleaver so have no ideal about scripting. I am trying to find a script that will delete dead vehicles does anyone know of one or able to make one for me

Any help would be greatful

Thanks
Title: Re: Can anyone help
Post by: hoz on 07 Feb 2009, 19:48:37
Did you try  (http://www.ofpec.com/ed_depot/index.php?action=details&id=419&game=ArmA)the Editors Depot?
Title: Re: Can anyone help
Post by: st3a1th on 07 Feb 2009, 20:34:15
Yes I have that one. But It dont delete the vehicle
Title: Re: Can anyone help
Post by: hoz on 07 Feb 2009, 20:54:46
You could change it here:

Code: [Select]
if(NOT(_x isKindOf "MAN")) then{
_vehicle = _x;
                deleteVehicle _x;


But I think if you delete a vehicle while there is a unit in it. It will crash arma. So be sure to change that.
Title: Re: Can anyone help
Post by: Rommel92 on 08 Feb 2009, 01:49:43
Haha, this is OFP not ArmA now Hoz.

You could simply does as Hoz said however:
Code: [Select]
if(NOT(_x isKindOf "MAN")) then{
_vehicle = _x;
{deletevehicle _x} foreach crew _x;
                deleteVehicle _x;
Title: Re: Can anyone help
Post by: hoz on 08 Feb 2009, 02:10:17
oh, I didn't realize I was in the OFP board. Thanks Rommel
Title: Re: Can anyone help
Post by: st3a1th on 08 Feb 2009, 12:07:50
That seems to work but it delete's alive vehicles too, is there away to make it so it only delete's it if it's destroyed ?