gitrinec 6 Posted December 26, 2019 (edited) Is it possible in game flip a vehicle upside down without destroying it or the vehicle occupants? Like an explosion. I did find a start, this can flip a vehicle upside down. _obj setVectorUp [0,0,-1]; Edited January 3, 2020 by gitrinec Solved the question Share this post Link to post Share on other sites
gitrinec 6 Posted December 27, 2019 Ok, I have progress, when I have the scripts completed, I'll post them. I've kept the ai in the car alive while upside down. But don't have a good transition from car to drag, probably have to black out in a cutscene not to see the ai jump out from the top then move to being dragged. Any ideas , anyone?. Share this post Link to post Share on other sites
Alert23 215 Posted December 27, 2019 hi, try this: [] spawn { cutText ["","BLACK OUT", 1]; sleep 1; AI_Name action ["getOut", vehicleName]; sleep 1; cutText ["","BLACK IN", 1];}; you can adjust the value sleep value to your suiting. Share this post Link to post Share on other sites
johnnyboy 3744 Posted December 27, 2019 Alert23's suggestion will work. I've added to it to put the units prone on the ground. I named a hatchback "car" and put 4 AI in it, started the mission in editor, and ran this from the console. You get 4 AI on the ground outside of car. Instead of setUnconscious, you could use switchMove to put AI in various prone positions outside of vehicle. [car] spawn { params["_car"]; cutText ["","BLACK OUT", 1]; sleep 1; { _car setVectorUp [0,0,-1]; moveout _x; unassignvehicle _x; _x setUnconscious true; _dir = [_car,_x] call BIS_fnc_dirto; _x setpos ([getpos _x, 1, _dir] call BIS_fnc_relPos); // move them 1 meter away so not laying under vehicle } foreach crew _car; sleep 1; cutText ["","BLACK IN", 1]; }; 1 Share this post Link to post Share on other sites
gitrinec 6 Posted December 28, 2019 Is it possible to post embedded videos or video links in the forums? I've not turned what I'm creating into a cutscene yet but. I do have an AI unit pulling the wounded guy out of the car sort of. Most of this code came from here. With my added changes but the animations might be different depending on what unit you use. You can look through animations for the unit under the injured section for the correct one. I move the unit out of the car briefly set him in the correct animation position and then put him back at the car and it looks like the AI unit pulls him out. It's not a finished script but looks halfway decent. I'm making a coop mission so If you're using SP it would need to be modified. The sleep variables or whatever should be tweaked to meet your needs. _dragger = the ai you want to be the dragger; _injured = the injured unit getting dragged; _obj= object where you want unit dragged to; _obj2 = object to spawn back at where the _draghrt unit is; [_dragger, "grabDrag"] remoteExecCall ["playAction", _dragger, true] ; [_injured, "AinjPpneMrunSnonWnonDb"] remoteExecCall ["playMove", _injured, true] ; _injured enableSimulation false; Sleep (0.01); waitUntil { ((AnimationState _dragger) == "AmovPercMstpSlowWrflDnon_AcinPknlMwlkSlowWrflDb_2") || ((AnimationState _dragger) == "AmovPercMstpSnonWnonDnon_AcinPknlMwlkSnonWnonDb_2")}; _injured attachTo [_dragger, [0, 1.2, 0]]; // attach injured _injured setDir 180; // set injured to turn his back on dragger _DummyClone = { private ["_dummy", "_dummygrp", "_dragger"]; _dragger = _this; _dummygrp = createGroup East; _dummy = _dummygrp createUnit ["RU_soldier", Position _dragger, [],0,"FORM"]; _dummy setUnitPos "up"; _dummy hideobject true; _dummy allowdamage false; _dummy setBehaviour "CARELESS"; _dummy disableAI "FSM"; _dummy forceSpeed 1.5; _dragger attachTo [_dummy,[0, -0.2, 0]]; _dragger setDir 180; _dummy; }; _dummy = _dragger call _DummyClone; sleep 30; //move injured unit to a marker _injured setpos getmarkerpos "some marker"; // set injured unit animation for being dragged [_injured, "AinjPpneMrunSnonWnonDb"] remoteExecCall ["playMove", _injured, true]; //place the unit facing in the correct dir for the _dragger unit to grab _injured setDir 180; sleep 2; //put the _injured unit back to the object where the _dragger unit is at. _injured setpos (_obj2 modelToWorld [0, 0, 0]); // I've previously set the _injured unit to unconscious so that he wont' jump from the upside down car, this sets him back to conscious. _injured setUnconscious false; sleep 2; [_dragger, "AcinPknlMwlkSrasWrflDb"] remoteExecCall ["playMove", _dragger, true]; _dragger disableAI "ANIM"; _dummy doMove (position _obj); Share this post Link to post Share on other sites