Jump to content
Sign in to follow this  
ADuke

Destroy vehicle when cannot move script

Recommended Posts

I would like to create an sqf script that I can initiate on a vehicle which will destroy the vehicle when it cannot move. (Is damaged after running into a wall or something). I have tried writing my own after researching and I always run into errors. Any help is appreciated.

ADuke

Share this post


Link to post
Share on other sites

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">

_vehicle = _this;

waituntil {

! canmove _vehicle;

sleep 10;

};

deletevehicle _vehicle;

And in the initline of the vehicle:

nul = this execVM "NameOfScript.sqf"

Share this post


Link to post
Share on other sites
<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">

_vehicle = _this;

waituntil {

! canmove _vehicle;

sleep 10;

};

deletevehicle _vehicle;

And in the initline of the vehicle:

nul = this execVM "NameOfScript.sqf"

Wouldn't this just delete the vehicle?

If I wanted to DESTROY the vehicle would I do this?...

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>[b]Code Sample[/b] </td></tr><tr><td id="CODE">

_vehicle = _this;

waituntil {

! canmove _vehicle;

sleep 10;

};

_vehicle setdammage 1;

Share this post


Link to post
Share on other sites

erm...*cough*...yes, of course. I'm sorry, might have not read exactly what you wrote.

Your change is correct of course. I apologize.

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  

×