Dan86 10 Posted July 16, 2009 Hello, i was wonering if there is any way to make for example MG gunner be able to put MG nest (like in domination from Xeno).I already tried the _this = player _this createvehicle "Fort_Nest_M240" _pos = getpos player _dir = getdir player player playMove "AinvPknlMstpSlayWrflDnon_medic"; sleep 4; hint "DONE" but knowing my scripting skills this is not how it should look like, any ideas? Share this post Link to post Share on other sites
Big Dawg KS 6 Posted July 16, 2009 _player = _this; _player playMove "AinvPknlMstpSlayWrflDnon_medic"; waitUntil{!(alive _player) || animationState _player == "AinvPknlMstpSlayWrflDnon_medic"}; if(alive _player)then{ sleep 4; _newMG = createVehicle ["Fort_Nest_M240",(getPos _player),[],0,"NONE]; _newMG setVectorDir (vectorDir _player); }; Share this post Link to post Share on other sites
Dan86 10 Posted July 16, 2009 Damn Big Dawg you're a real champ in that. Was some problems on beggining but i change the _player = plr6 to match the in game variable and it worked. But now when i set the "_newMG" as unlocked to be able to get in, solider look 90degress left, he is not looking forward where the gun is pointing, that is very strange. _player = plr6; _player playMove "AinvPknlMstpSlayWrflDnon_medic"; waitUntil{!(alive _player) || animationState _player == "AinvPknlMstpSlayWrflDnon_medic"}; if(alive _player)then{ sleep 4; _newMG = createVehicle ["Fort_Nest_M240",(getPos _player),[],0,"CAN_COLLIDE"]; _newMG setVectorDir (vectorDir _player); _newMG setVehicleLock "UNLOCKED" }; Share this post Link to post Share on other sites
Big Dawg KS 6 Posted July 16, 2009 Hmm... did the medic animation finish before you got in? Or maybe it's related to the setVectorDir (shouldn't be though). Share this post Link to post Share on other sites
Dan86 10 Posted July 16, 2009 (edited) Yes medic animation was completed but mg was locked so i couldnt get in there. After setting it as UNLOCKED it was 90degree 'bug' afterthat tried setDir/getdir and it fix that problem. _player = plr6; _player playMove "AinvPknlMstpSlayWrflDnon_medic"; waitUntil{!(alive _player) || animationState _player == "AinvPknlMstpSlayWrflDnon_medic"}; if(alive _player)then{ sleep 4; _newMG = createVehicle ["Fort_Nest_M240",(getPos _player),[],0,"NONE"]; _newMG setDir (getdir _player); _newMG setVehicleLock "UNLOCKED" }; Now works great, this wouldnt be possible without your help, thanks'a'ton Big Dawg Edited July 16, 2009 by Dan86 Share this post Link to post Share on other sites
Big Dawg KS 6 Posted July 16, 2009 Well, that's slightly concerning regarding the use of setVectorDir... hopefully it's not a bug with the command. :( Share this post Link to post Share on other sites