Home   Help Search Login Register  

Author Topic: Can anyone help  (Read 2440 times)

0 Members and 1 Guest are viewing this topic.

Offline st3a1th

  • Members
  • *
Can anyone help
« 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

Offline hoz

  • OFPEC Site
  • Administrator
  • *****
Re: Can anyone help
« Reply #1 on: 07 Feb 2009, 19:48:37 »
Did you try the Editors Depot?
Xbox Rocks

Offline st3a1th

  • Members
  • *
Re: Can anyone help
« Reply #2 on: 07 Feb 2009, 20:34:15 »
Yes I have that one. But It dont delete the vehicle

Offline hoz

  • OFPEC Site
  • Administrator
  • *****
Re: Can anyone help
« Reply #3 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.
Xbox Rocks

Offline Rommel92

  • Members
  • *
Re: Can anyone help
« Reply #4 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;

Offline hoz

  • OFPEC Site
  • Administrator
  • *****
Re: Can anyone help
« Reply #5 on: 08 Feb 2009, 02:10:17 »
oh, I didn't realize I was in the OFP board. Thanks Rommel
Xbox Rocks

Offline st3a1th

  • Members
  • *
Re: Can anyone help
« Reply #6 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 ?