Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
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?]
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.
mv22_pack = compile preprocessFileLineNumbers "\z\addons\air2\mv22\scripts\pack.sqf";
@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.
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;
};
};
mv22_pack = compile preprocessFileLineNumbers
uh1y_pack = compile preprocessFileLineNumbers "custom\animate\uh1y_pack.sqf";
mv22_fold = -1;
mv22_unfold = -1;
mv22_open = -1;
mv22_close = -1;
suv_close = -1;
suv_open = -1;
uh1y_fold = -1;
uh1y_unfold = -1;
"mv22_fold","mv22_unfold","mv22_open","mv22_close","suv_close","suv_open","mv22_fold","mv22_unfold","uh1y_fold","uh1y_unfold"