Jump to content
Sign in to follow this  
Dan86

Mg Nest create?

Recommended Posts

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
_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

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

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

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 by Dan86

Share this post


Link to post
Share on other sites

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

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×