braker 10 Posted March 14, 2016 Hello, I need help to implement this script in my mission. What I must put in my trigger to execute the script ? Here is the script: // --- get vehicle out of unitPlay V1.1 --- by TheRegurgitator //out of fuel method stops vehicle momentarily, but it retains its velocity when it is set back to _vel //get velocity _vel = velocity _vehicle; //stop unitPlay _vehicle setFuel 0; sleep 0.001; _vehicle setFuel 1; // you can change this value to have it get the fuel from beforehand, but usually fuel is not an issue when using unitPlay //set velocity back to previous _vehicle setVelocity [ (_vel select 0), (_vel select 1), (_vel select 2) ]; Thanks and regards. Share this post Link to post Share on other sites
Goro 21 Posted March 14, 2016 Hello, I need help to implement this script in my mission. What I must put in my trigger to execute the script ? Here is the script: // --- get vehicle out of unitPlay V1.1 --- by TheRegurgitator //out of fuel method stops vehicle momentarily, but it retains its velocity when it is set back to _vel //get velocity _vel = velocity _vehicle; //stop unitPlay _vehicle setFuel 0; sleep 0.001; _vehicle setFuel 1; // you can change this value to have it get the fuel from beforehand, but usually fuel is not an issue when using unitPlay //set velocity back to previous _vehicle setVelocity [ (_vel select 0), (_vel select 1), (_vel select 2) ]; Thanks and regards. Try ExecVM "Scriptname.sqf" Or: nul = this execVM "scriptname.sqf"; Or this = execVM "scriptname.sqf"; Share this post Link to post Share on other sites
donelsarjo 60 Posted March 14, 2016 /|\ | Bullshit. First one needs to know when you want the script to launch. Second you have to adjust the script so it gets something to work with : "_vehicle = _this select 0;" or something.Third poin: the script will do nothing because the AI driving the vehicle will just go on doing his stuff. but i can try it out for you. Share this post Link to post Share on other sites
donelsarjo 60 Posted March 14, 2016 so i have tried it. condition : [thistrigger, veh1] call BIS_fnc_inTrigger; activation: _kauabanga = [ veh1] execVM "script.sqf"; script adjusted with: _vehicle = _this select 0; result -> nothing ai driving through the trigger doing the same as before. i u try it with other moving things it will propably work. Share this post Link to post Share on other sites
braker 10 Posted March 14, 2016 Ok thats work for me with a Little Bird. Thanks for help. Share this post Link to post Share on other sites
braker 10 Posted March 14, 2016 So I have modified the script: // --- get vehicle out of unitPlay V1.1 --- by TheRegurgitator //out of fuel method stops vehicle momentarily, but it retains its velocity when it is set back to _vel _vehicle = _this select 0; //get velocity _vel = velocity _vehicle; //stop unitPlay _vehicle setFuel 0; sleep 0.001; _vehicle setFuel 1; // you can change this value to have it get the fuel from beforehand, but usually fuel is not an issue when using unitPlay _vehicle engineOn true; //set velocity back to previous _vehicle setVelocity [ (_vel select 0), (_vel select 1), (_vel select 2) ]; I can now stop Unitplay when both pilots dies... Share this post Link to post Share on other sites
donelsarjo 60 Posted March 14, 2016 Was this a question? Did it work? Share this post Link to post Share on other sites
braker 10 Posted March 14, 2016 Was this a question? Did it work? No, it's ok. And yes, thats work nice. Share this post Link to post Share on other sites