[Support] Animated Vehicles

What's the correct syntax for including the other Armored SUV class? In fn_selfactions it defines the vehicle class as "ArmoredSUV_Base_PMC", but for my server it should be "ArmoredSUV_PMC_DZ" and "ArmoredSUV_PMC" How do I include both so that they both work? Server is Overpoch.
 
Ok I changed all Armored SUV classes to ArmoredSUV_PMC_DZ in the dynamic vehicle spawn, Object_DATA table and Traders_DATA tables, as well as the animation script. Will see how that goes.
 
Animations for the Armored SUV and the ramp for the MV22 is working, but it will not unfold/fold.
No errors in RPT.
Ideas?
 
All working fantastically, thanks heaps eBay. I was wondering if you could script the animations for the UH1Y and the AH1Z if possible?

[EDIT : Also, is it possible to make this persist through server restart?]
 
Last edited:
All working fantastically, thanks heaps eBay. I was wondering if you could script the animations for the UH1Y and the AH1Z if possible?

[EDIT : Also, is it possible to make this persist through server restart?]

Im think that would be easy ill look into as well
 
pack.sqf is literally just:
Code:
_mv22 =_this select 0;
_phase=_this select 1;
_mv22 animate["engine_prop_1_1_turn",_phase];
_mv22 animate["engine_prop_1_2_turn",_phase];
_mv22 animate["engine_prop_1_3_turn",_phase];
_mv22 animate["engine_prop_2_1_turn",_phase];
_mv22 animate["engine_prop_2_2_turn",_phase];
_mv22 animate["engine_prop_2_3_turn",_phase];
_mv22 animate["engine_prop_1_1_close",_phase];
_mv22 animate["engine_prop_1_3_close",_phase];
_mv22 animate["engine_prop_2_1_close",_phase];
_mv22 animate["engine_prop_2_2_close",_phase];
_mv22 animate["pack_engine_1",_phase];
_mv22 animate["pack_engine_2",_phase];
_mv22 animate["turn_wing",_phase];

so just save that as pack.sqf to your missions scripts folder, then add:

Code:
    mv22_pack = compile preprocessFile "scripts\pack.sqf";

to compiles.sqf

Should work.


I tried doing it this way

Code:
  mv22_pack = compile preprocessFileLineNumbers "\z\addons\air2\mv22\scripts\pack.sqf";

This isnt giving me the missing file in client rpt. BUT it still doesnt make them fold!

but i guess ca is client side, and z is server :/ what if i put the air2.pbo into my server addons?

guess i will have to include it into the animate folder on mission pbo for now :p

:(
 
Last edited:
@ALKINDA - You are confusing pbo prefixes.

\z\addons\dayz_code\ = inside client files @DayZ_Epoch\addons\dayz_code.pbo
\z\addons\dayz_server\ = inside server pbo @DayZ_Epoch_Server\addons\dayz_server.pbo
\ca\air2\ = inside client files Common\air2.pbo
path\script.sqf = inside mission file

If you don't know what the prefix is just extract the pbo and look at the $PBOPREFIX$ file in your text editor. That shows you the path to use when you need to load files from that addon. All of the addons inside the \Common\ folder are loaded automatically when Arma 2 OA starts. Arma 2 OA is like an expansion to Arma 2 which is why it loads all the addons in the Arma 2\Common\ folder and Arma 2 OA\Common\ folder when the game starts. You can reference any files in those addons in your mission scripts using the appropriate prefixes. That includes images, sounds, scripts, etc. You do not need to copy them to your mission first, doing so is just a waste of mission file size.

I understood after I wrote this lol playing with the files, thank you for your time in clarification.

I too added the uh1y but I cannot add them thru the air pbo. I just added the file to my mission and it worked.

Here is my uh1y and your mv22 and suv put together.

FN_SELFACTIONS SNIPPET

Code:
if (_inVehicle && {_vehicle isKindOf "MV22"}) then {
   if (isEngineOn _vehicle) then {[_vehicle,0] call mv22_pack;};
   if (mv22_fold < 0) then {
     themv22 = _vehicle;
     if !(isEngineOn themv22) then {
       mv22_fold = themv22 addAction ["Fold","custom\animate\mv22_fold.sqf","",5,false,true];
       mv22_unfold = themv22 addAction ["UnFold","custom\animate\mv22_unfold.sqf","",5,false,true];
       mv22_open = themv22 addAction ["Open Ramp","custom\animate\mv22_open.sqf","",5,false,true];
       mv22_close = themv22 addAction ["Close Ramp","custom\animate\mv22_close.sqf","",5,false,true];
     };
   };
   if (isEngineOn themv22) then {
     themv22 removeAction mv22_fold;
     mv22_fold = -1;
     themv22 removeAction mv22_unfold;
     mv22_unfold = -1;
     themv22 removeAction mv22_open;
     mv22_open = -1;
     themv22 removeAction mv22_close;
     mv22_close = -1;
   };
} else {
    if (!isNil "themv22") then {
       themv22 removeAction mv22_fold;
       mv22_fold = -1;
       themv22 removeAction mv22_unfold;
       mv22_unfold = -1;
       themv22 removeAction mv22_open;
       mv22_open = -1;
       themv22 removeAction mv22_close;
       mv22_close = -1;
   };
};

if (_inVehicle && {_vehicle isKindOf "ArmoredSUV_Base_PMC"}) then {
   if ((_vehicle animationPhase "HideGun_01") == 1) then {
     _unit = _vehicle turretUnit [0];
     if (!(isNull _unit)) then {
       _unit action ["moveToCargo",_vehicle,2];
       titleText ["\n\nYou must open the hatch first.","PLAIN DOWN"];titleFadeOut 4;
     };
   };
   if (suv_close < 0) then {
     thesuv = _vehicle;
     suv_close = thesuv addAction ["Close Hatch","custom\animate\suv_close.sqf","",5,false,true];
     suv_open = thesuv addAction ["Open Hatch","custom\animate\suv_open.sqf","",5,false,true];
   };
} else {
    if (!isNil "thesuv") then {
        thesuv removeAction suv_close;
        suv_close = -1;
        thesuv removeAction suv_open;
        suv_open = -1;
    };
};

//
if (_inVehicle && {(typeOf_vehicle) in ["UH1Y","UH1Y_DZ","UH1Y_DZE"]}) then {
   if (isEngineOn _vehicle) then {[_vehicle,0] call uh1y_pack;};
   if (uh1y_fold < 0) then {
     theuh1y = _vehicle;
     if !(isEngineOn theuh1y) then {
       uh1y_fold = theuh1y addAction ["Fold","custom\animate\uh1y_fold.sqf","",5,false,true];
       uh1y_unfold = theuh1y addAction ["UnFold","custom\animate\uh1y_unfold.sqf","",5,false,true];

     };
   };
   if (isEngineOn theuh1y) then {
     theuh1y removeAction uh1y_fold;
     uh1y_fold = -1;
     theuh1y removeAction uh1y_unfold;
     uh1y_unfold = -1;

   };
} else {
    if (!isNil "theuh1y") then {
       theuh1y removeAction uh1y_fold;
       uh1y_fold = -1;
       theuh1y removeAction uh1y_unfold;
       uh1y_unfold = -1;

   };
};

In compiles find
Code:
mv22_pack = compile preprocessFileLineNumbers

place this code above the found line
Code:
uh1y_pack = compile preprocessFileLineNumbers "custom\animate\uh1y_pack.sqf";

VARIABLES.SQF inside dayz_resetSelfActions = {
Code:
    mv22_fold = -1;
    mv22_unfold = -1;
    mv22_open = -1;
    mv22_close = -1;
    suv_close = -1;
    suv_open = -1;
    uh1y_fold = -1;
    uh1y_unfold = -1;

AHCONFIG inside _dayzActions =[
Code:
"mv22_fold","mv22_unfold","mv22_open","mv22_close","suv_close","suv_open","mv22_fold","mv22_unfold","uh1y_fold","uh1y_unfold"
Here is the animate folder

http://www.filedropper.com/animate

*note*
make sure your fn_selfactions and compiles link to your animate folder. my structure is custom\animate. the default was different.

Thanks to ebay for showing me how to do this :p
 
Last edited:
Love the script, works great. Very nice setup instructions. I'm wondering if anyone has figured out how to save an object that has been folded? I've seen it on a server before, but didn't have away to find out how they made it persist thru a restart.
 
I've seen it be able to save in the fold state after a restart, so I know its possible. I just don't know to much about coding for to recreate it. Thanks for the great work!
 
Back
Top