Jump to content
Noraf

How to animate the minigun on the armoured SUV

Recommended Posts

anyone figured out how to get the minigun on the armoured SUV to be folded down?

Or even better, how to addaction to it so you can fold it up and down as needed?

Share this post


Link to post
Share on other sites


suv animate["HideGun_01",1];
suv animate["HideGun_02",1];
suv animate["HideGun_03",1];
suv animate["HideGun_04",1];
suv animate["CloseCover1",1];
suv animate["CloseCover2",1];

this folds the gun and closes the roof.

to open it all up again. replace last arg "1" with 0

Share this post


Link to post
Share on other sites

Nice one, nuxil. I will save that for future reference :)

Share this post


Link to post
Share on other sites

use scripts :P and actions and Functions module

in init of the SUV:

suv_close_action = thesuv addAction [""Close Cover"",""scripts\lg.sqf"",[],1,false,true];

the scripts:

LG.SQF

_target = _this select 0;
_caller = _this select 1;
_id = _this select 2;

_nic = [nil,nil,"per",rremoveAction, _target, _id] call RE;
_target removeAction _id;
_target animate["HideGun_01",1];
sleep 0.5;
_target animate["HideGun_02",1];
sleep 0.5;
_target animate["HideGun_03",1];
sleep 0.5;
_target animate["HideGun_04",1];
sleep 4;
_target animate["CloseCover1",1];
sleep 4;
_target animate["CloseCover2",1];
sleep 5;
suv_open_action = _target addAction ["Open Cover","scripts\rg.sqf",[],1,false,true];

RG.SQF

_target = _this select 0;
_caller = _this select 1;
_id = _this select 2;

_nic = [nil,nil,"per",rremoveAction, _target, _id] call RE;
_target removeAction _id;
_target animate["CloseCover2",0];
sleep 1;
_target animate["CloseCover1",0];
sleep 2;
_target animate["HideGun_04",0];
sleep 0.5;
_target animate["HideGun_03",0];
sleep 0.5;
_target animate["HideGun_02",0];
sleep 0.5;
_target animate["HideGun_01",0];
sleep 5;
suv_close_action = _target addAction ["Close Cover","scripts\lg.sqf",[],1,false,true];

Quick and dirty, but it works

Edited by NoN_Shiva
forgot stuff

Share this post


Link to post
Share on other sites
use scripts :P and actions and Functions module

in init of the SUV:

suv_close_action = thesuv addAction [""Close Cover"",""scripts\lg.sqf"",[],1,false,true];

This code returns multiple errors saying "Missing ;" etc. I cant seem to get animating the turret to work at all :(

Share this post


Link to post
Share on other sites

i think the right code would be :

suv_close_action = thesuv addAction ["Close Cover","scripts\lg.sqf",[],1,false,true];

Share this post


Link to post
Share on other sites

Yupp like noraf said.

Copy pasted that out of the mission.sqf, so it had some extra """"""" thingies, my bad

Share this post


Link to post
Share on other sites
Yupp like noraf said.

Copy pasted that out of the mission.sqf, so it had some extra """"""" thingies, my bad

Awsome worked great that time, thanks guys :D

Share this post


Link to post
Share on other sites

i have a question in pmc mission transportation we see the armord suv preforming the script above and a man executing an animation where he open the hatches and takes the gun up. what is the name of that animation

Share this post


Link to post
Share on other sites

One Question, thoug.

Would it be possible for anyone of you, to create a script doing this either as client-side mod/addon (.pbo) or even as a script to place in the mission folder, and initializing into the init.sqf in order to enable Open/Closing hatches for every PMC SUV (Armoured) on a server? I'd like to add this script to an insurgency edit, and it wouldn't really be very efficient to add 12 different scripts to 12 different vehicles + i don't even know the names of the vehicles at all times.

Share this post


Link to post
Share on other sites
One Question, thoug.

Would it be possible for anyone of you, to create a script doing this either as client-side mod/addon (.pbo) or even as a script to place in the mission folder, and initializing into the init.sqf in order to enable Open/Closing hatches for every PMC SUV (Armoured) on a server? I'd like to add this script to an insurgency edit, and it wouldn't really be very efficient to add 12 different scripts to 12 different vehicles + i don't even know the names of the vehicles at all times.

look into BattleZone or BattleField_3

not only does it add player actions for , it also has the AI auto using almost every vehicle animation there is including the SUV's

links to each below

Share this post


Link to post
Share on other sites

Oh you found the search button.

Hey uhhh where do I find the sq.sqf and rq.sqf files? Im getting PMC soon and I want the hatch to be able to close

You find those sqfsHere.

Create text file, copy the apropriate code from the post there, and save it as rq or sq.sqf.

Share this post


Link to post
Share on other sites

1. Add to Initialization Armored SUV in Arma 2 Editor:

 

suv_close_action = this addAction ["Close Cover","scripts\lg.sqf",[],1,false,true];

 

2. Create new folder and rename it to scripts (Side mission.sqm).

 

3. In scripts folder create 2 text file and rename its to lg.sqf and rg.sgf (in file explorer must activated file name extensions and then rename .txt to .sqf)

 

4. Copy and paste scripts commands in 2 files and save :

 

4-1 Contents of lg.sqf :

 

_target = _this select 0;
_caller = _this select 1;
_id = _this select 2;

_nic = [nil,nil,"per",rremoveAction, _target, _id] call RE;
_gunner = gunner _target;
_gunner switchMove "ArmoredSUV_GunnerTurnIn_PMC";

_target removeAction _id;
_target animate["HideGun_01",1];
sleep 0.5;
_target animate["HideGun_02",1];
sleep 0.5;
_target animate["HideGun_03",1];
sleep 0.5;
_target animate["HideGun_04",1];
sleep 1;
_target animate["CloseCover1",1];
_target animate["CloseCover2",1];
suv_open_action = _target addAction ["Open Cover","scripts\rg.sqf",[],1,false,true];

4-2 Contents of rg.sqf :

 

_target = _this select 0;
_caller = _this select 1;
_id = _this select 2;

_nic = [nil,nil,"per",rremoveAction, _target, _id] call RE;
_target removeAction _id;
_target animate["CloseCover2",0];
sleep 1;
_target animate["CloseCover1",0];
sleep 2;
_target animate["HideGun_04",0];
sleep 0.5;
_target animate["HideGun_03",0];
sleep 0.5;
_target animate["HideGun_02",0];
sleep 0.5;
_target animate["HideGun_01",0];
sleep 0.5;
_gunner = gunner _target;
_gunner switchMove "ArmoredSUV_GunnerTurnOut_PMC";
suv_close_action = _target addAction ["Close Cover","scripts\lg.sqf",[],1,false,true];

5. run preview in editor and set to gunner then activate action menu by mouse wheel that you view Close cover and open cover.

 

6. Finish and 100% Worked it for me. (My version of Arma 2 Operation Arrowhead is: 1.64.144629) (Latest in 2022 :D)

 

7.I hope I was able to help. Arma 2 old but lovely

 

8. Dismiss. 😉

 

Share this post


Link to post
Share on other sites

There is only one problem is that when the minigun enters the car, it is fired, which should not be the case, and even the my friendly AI team shoots at the enemy from inside the car. Does anyone have a solution? Thanks

Share this post


Link to post
Share on other sites

Here it is corrected, so that it works as it should.
I also modified the times so that the animations look more fluid, without so many dead times.

in init of the SUV:

suv_close_action = this addAction ["Close Cover","scripts\lg.sqf",[],1,false,true];



lg.sqf

 

_target = _this select 0;
_caller = _this select 1;
_id = _this select 2;

_nic = [nil,nil,"per",removeAction, _target, _id] call RE;
_target removeAction _id;
gunner _target action ["moveToCargo", _target,1];
_target animate["HideGun_01",1];
sleep 0.2;
_target animate["HideGun_02",1];
sleep 0.1;
_target animate["HideGun_03",1];
sleep 0.3;
_target animate["HideGun_04",1];
sleep 1;
_target animate["CloseCover1",1];
sleep 1;
_target animate["CloseCover2",1];
sleep 1;
suv_open_action = _target addAction ["Open Cover","scripts\rg.sqf",[],1,false,true];

 

 

rg.sqf

 

_target = _this select 0;
_caller = _this select 1;
_id = _this select 2;

_nic = [nil,nil,"per",removeAction, _target, _id] call RE;
_target removeAction _id;
_target animate["CloseCover2",0];
sleep 1;
_target animate["CloseCover1",0];
sleep 1;
_target animate["HideGun_04",0];
sleep 0.3;
_target animate["HideGun_03",0];
sleep 0.1;
_target animate["HideGun_02",0];
sleep 0.2;
_target animate["HideGun_01",0];
sleep 2;
suv_close_action = _target addAction ["Close Cover","scripts\lg.sqf",[],1,false,true];

 

 

 

Edited by dalber24
misspelled rremoveAction to removeAction
  • Like 2

Share this post


Link to post
Share on other sites

If you want to keep the TurnIn animation it would look like this.

lg.sqf

_target = _this select 0;
_caller = _this select 1;
_id = _this select 2;

_nic = [nil,nil,"per",removeAction, _target, _id] call RE;
_target removeAction _id;
_gunner = gunner _target;
_gunner switchMove "ArmoredSUV_GunnerTurnIn_PMC";
sleep 2;
gunner _target action ["moveToCargo", _target,1];
_target animate["HideGun_01",1];
sleep 0.2;
_target animate["HideGun_02",1];
sleep 0.1;
_target animate["HideGun_03",1];
sleep 0.3;
_target animate["HideGun_04",1];
sleep 1;
_target animate["CloseCover1",1];
sleep 1;
_target animate["CloseCover2",1];
sleep 1;
suv_open_action = _target addAction ["Open Cover","scripts\rg.sqf",[],1,false,true];



 

  • Like 1

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

×