Jump to content
williamle12

Need help with delete vehicle

Recommended Posts

HI, so straight on i use VVS ( virtual vehicle spawner )to spawn vehicle in the certain maker but the thing is if you didnt clear the spawn area before you spawn another vehicle, the 2 vehicle will spawn and goes boom! 
so i need an solution to delete the spawn area prio to spawn another vehicle! 
thank you 
sorry my english is bad

Share this post


Link to post
Share on other sites

@Williamle12 Interesting my VVS does not have this issue as it deletes any vehicle in the way.  That said I ahve modified my version over the years to keep it up to date and add features.

I have just checked and it does appear I may have modified the spawn function to delete a vehicle in the way.

In the VVS\functions\fn_spawnVehicel.sqf you want to add the following:

//Check to make sure the spawn point doesn't have a vehicle on it, if it does then delete it.
_spCheck = nearestObjects[_position,["landVehicle","Air","Ship"],11] select 0;
if(!isNil "_spCheck") then {deleteVehicle _spCheck;};

Before the line:

_vehicle = createVehicle [_className, [0,0,10], [], 0, "CAN_COLLIDE"];

Good luck  S

 

  • Like 1
  • Thanks 1

Share this post


Link to post
Share on other sites
2 minutes ago, strider42 said:

@Williamle12 Interesting my VVS does not have this issue as it deletes any vehicle in the way.  That said I ahve modified my version over the years to keep it up to date and add features.

I have just checked and it does appear I may have modified the spawn function to delete a vehicle in the way.

In the VVS\functions\fn_spawnVehicel.sqf you want to add the following:


//Check to make sure the spawn point doesn't have a vehicle on it, if it does then delete it.
_spCheck = nearestObjects[_position,["landVehicle","Air","Ship"],11] select 0;
if(!isNil "_spCheck") then {deleteVehicle _spCheck;};

Before the line:


_vehicle = createVehicle [_className, [0,0,10], [], 0, "CAN_COLLIDE"];

Good luck  S

 

i just check it and it do have the line 

//Check to make sure the spawn point doesn't have a vehicle on it, if it does then delete it.
_spCheck = nearestObjects[_position,["landVehicle","Air","Ship"],12] select 0;
if(!isNil "_spCheck") then {deleteVehicle _spCheck;};

how ever i cant find:

_vehicle = createVehicle [_className, [0,0,10], [], 0, "CAN_COLLIDE"];

 

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

×