Jump to content
Sign in to follow this  
Perrinmajor

I need help making a spawned vehicle delete its self after it is destroyed

Recommended Posts

I am working on a mission where you are at base and you can request units and they will spawn in front of the player but once the vehicle is destroyed i want it to dissapear after 20 seconds, i need to know what to put in the .Sqs file to allow that

Share this post


Link to post
Share on other sites

Is there anyway you can expand apon that?

so would this sound about right

_veh = car1

_veh thiscreateeventhandler if destroyed go to Deletevehicle _veh

Share this post


Link to post
Share on other sites

should be:

_veh addEventHandler ["killed", {sleep 20; deleteVehicle _this select 0}];

// _veh in the handler wont work since the scope has changed ^^

Share this post


Link to post
Share on other sites

Hmm for some reason that did not do the trick not quite sure why but the vehicle carnage still remains

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
Sign in to follow this  

×