View Full Version : V-22 Osprey Folded
Hi, I've noticed that in the Main Intro Screen [Main Menu + Carrier] that there are FOLDED V-22 Osprey on deck.
Is this a place-able object? I've tried to search for the editor, but nothing.
How would I go about to script this in the editor?
This is what I found in the Utes intro folder:
_xtype = [this,1] execvm "\ca\air2\mv22\scripts\pack.sqf"
Put it in the init box.
And how do we unfold them again?
Use the same code, and replace [this,1] with [this,0] to unfold.
To Fold
_xtype = [this,1] execvm "\ca\air2\mv22\scripts\pack.sqf"
To Unfold
_xtype = [this,0] execvm "\ca\air2\mv22\scripts\pack.sqf"
Animation in my opinion happens too fast.
it's probably not meant for viewing.
And while we're at it, fold/unfold the AH-1Z:
_xtype = [this,1] execVM "\Ca\air\Scripts\AH1Z_fold.sqf"
_xtype = [this,0] execVM "\Ca\air\Scripts\AH1Z_fold.sqf"
it's probably not meant for viewing.
I'm pretty sure it is. It's step wise, and fairly accurate, just on overdrive lol.
Ex.
Rotor blades fold. Rotors tilt as wings rotate into closed position.
this feature is great for a lock visual
Vehicle locked = packed.
Vehicle unlocked = unpacked.
Saves time running to the vehicle only to find out its LOCKED :mad:
this feature is great for a lock visual
Vehicle locked = packed.
Vehicle unlocked = unpacked.
Saves time running to the vehicle only to find out its LOCKED :mad:
If you noticed. If it is in the packed position, it still works! lol
UH1Y foldy thingy :)
_xtype = [this,1] execvm "\ca\air2\UH1Y\scripts\fold.sqf"
_xtype = [this,0] execvm "\ca\air2\UH1Y\scripts\fold.sqf"
Yeah, just wanted to post those mv-22,ah-1z and uh-1y folding scripts, but i see they are already writen down here :D
These scripts are good, but they are not quite enough for my needs :)
You see i want to place folded mv-22s close to each other, but i can't because of those folding animations. Is there any way to fold them without that script?
As a work around to this tiny issues, i thought an idea of placing mv-22s somewhere on the map for few seconds so that they would fold and then be teleported to the proper places on "TEH BOUT" close to each other.
But my work around failed since arma1's teleportation script is outdated i gues.
Any sollutions?
Blaunarwal
Jun 5 2009, 17:27
Does someone know the exact deck heigth?
schaefsky
Jun 5 2009, 17:57
i thought an idea of placing mv-22s somewhere on the map for few seconds so that they would fold and then be teleported to the proper places on "TEH BOUT" close to each other.
But my work around failed since arma1's teleportation script is outdated i gues.
Any sollutions?
I don't know the teleportation script, but setting up parking positions with empty markers and then setPosing the mv22s should do
_result = [mv22_0, 1] execvm "\ca\air2\mv22\scripts\pack.sqf";
// better do the following by checking anim state, but well...
sleep 3;
mv22_0 setPos getMarkerPos "m_0";
Shrademn'Yyhrs
Jun 5 2009, 18:26
You see i want to place folded mv-22s close to each other, but i can't because of those folding animations. Is there any way to fold them without that script?
My solution for that: different heigth. (sorry for my poor english)
Does someone know the exact deck heigth?
The deck height should be 15.4
Does someone know the exact deck heigth?
LHD deck
this setPosASL [getposASL this select 0, getposASL this select 1, 15.9]
That is whats in the intro
I whipped up a set of pack/unpack addaction scripts. There pretty basic but do the job. Works with UH1Y, AH1Z and MV22. Put this in the init line of the vehicle and name the vehicle to have action of packing for when vehicle starts unfolded.
ghst_helofold = aircraft_name addAction ["Pack Aircraft", "airpack.sqf"];
airpack.sqf
_aircraft = _this select 0;
_caller = _this select 1;
_id = _this select 2;
_type = typeof _aircraft;
waituntil {!isEngineOn _aircraft};
switch (_type) do {
case "AH1Z": {_xtype = [_aircraft,1] execvm "\ca\air\Scripts\AH1Z_fold.sqf"};
case "UH1Y": {_xtype = [_aircraft,1] execvm "\ca\air2\UH1Y\Scripts\fold.sqf"};
case "MV22": {_xtype = [_aircraft,1] execvm "\ca\air2\mv22\scripts\pack.sqf"};
};
_aircraft removeaction _id;
_aircraftunpack = _aircraft addAction ["Unpack Aircraft", "dta\scripts\airunpack.sqf"];
If aircraft starts folded use
ghst_helofold = aircraft_name addAction ["Unpack Aircraft", "airunpack.sqf"];
airunpack.sqf
_aircraft = _this select 0;
_caller = _this select 1;
_id = _this select 2;
_type = typeof _aircraft;
waituntil {!isEngineOn _aircraft};
switch (_type) do {
case "AH1Z": {_xtype = [_aircraft,0] execvm "\ca\air\Scripts\AH1Z_fold.sqf"};
case "UH1Y": {_xtype = [_aircraft,0] execvm "\ca\air2\UH1Y\Scripts\fold.sqf"};
case "MV22": {_xtype = [_aircraft,0] execvm "\ca\air2\mv22\scripts\pack.sqf"};
};
_aircraft removeaction _id;
_aircraftpack = _aircraft addAction ["Pack Aircraft", "dta\scripts\airpack.sqf"];
Not tested with MP but i think it would work. If anyone could confirm or deny this that would be appreciated.
BelgarionNL
Jul 19 2009, 19:31
so how do i need to use this again? :P
is it possible that when you want to fly in the osprey that it starts unfolding?
Blueteamguy
Jul 19 2009, 20:59
Also, you can use the built-in scripts mod to allow you to unpack the osprey, aand open the doors in the C130
ps, it DOESN'T start unfolding :P
vengeance1
Jul 19 2009, 23:52
I tried this but it gets an error on unpack, says it can find file
"dta\scripts\airunpack.sqf":confused:
Cptkanito
Jul 21 2009, 13:27
same, if u pack it then unpack it, then try to pack it again u get that error "dta\scripts\airunpack.sqf" not found...
same, if u pack it then unpack it, then try to pack it again u get that error "dta\scripts\airunpack.sqf" not found...
where did you put the scripts?. You need to make sure the path is right. For me I put most scripts in dta\scripts which are folders
Cptkanito
Jul 26 2009, 15:55
well if the paths weren't right then it wouldn't have worked the first time would it? anyway, i'll give it a try...
cestcomi
Aug 4 2009, 00:56
It works for me but I didn't know you could fly whit the MV22 folded (http://www.dailymotion.com/user/cestcomi/video/xa23gx_gfdsarma2-mv22-funny_videogames) !
:icon_dj:
It works for me but I didn't know you could fly whit the MV22 folded (http://www.dailymotion.com/user/cestcomi/video/xa23gx_gfdsarma2-mv22-funny_videogames) !
Nice looking base you got there.
Rupert_The_Bear
Sep 23 2009, 21:32
It works for me but I didn't know you could fly whit the MV22 folded (http://www.dailymotion.com/user/cestcomi/video/xa23gx_gfdsarma2-mv22-funny_videogames) !
:icon_dj:
I almost fell off my chair watching that xD
I've got a small problem. At first: When the mission starts, the choppers are unfolded and then they start folding. Is it possible to spawn them directly folded? And my other problem is, why the hell do they spawn above the deck and me also, but I fell down on deck and can walk around. Others just stay flying above the deck and when I tell them to go there they fall on deck and die.:eek:
Thanks in advance for the help.
I almost fell off my chair watching that xD
I've got a small problem. At first: When the mission starts, the choppers are unfolded and then they start folding. Is it possible to spawn them directly folded? And my other problem is, why the hell do they spawn above the deck and me also, but I fell down on deck and can walk around. Others just stay flying above the deck and when I tell them to go there they fall on deck and die.:eek:
Thanks in advance for the help.
I've got same problem too! :(
I tried the script but doesn't works... so I changed the line:
this addaction ["Pack","airpack.sqf"] and now it work! But I've got a problem with unpack: I put the file manually in DTA now I've got the 2 files: pack & unpack and now it works... But when I put the map in server in this way I have to send each player the dta/scripts folder! Can you fix it? Please? Another question is: how I can make the animation slow? because it's too fast! Thaks!
ok here is how i did the scripts to fold and unfold stuff
to start folded put this in the vehicles init
_xtype = [this,0] execvm "airpack.sqf"
to start unfolded use this
_xtype = [this,0] execvm "airunpack.sqf"
i edited the sqfs to look like this
airpack.sqf
_aircraft = _this select 0;
_caller = _this select 1;
_id = _this select 2;
_type = typeof _aircraft;
waituntil {!isEngineOn _aircraft};
switch (_type) do {
case "AH1Z": {_xtype = [_aircraft,1] execvm "\ca\air\Scripts\AH1Z_fold.sqf"};
case "UH1Y": {_xtype = [_aircraft,1] execvm "\ca\air2\UH1Y\Scripts\fold.sqf"};
case "MV22": {_xtype = [_aircraft,1] execvm "\ca\air2\mv22\scripts\pack.sqf"};
};
_aircraft removeaction _id;
_aircraftunpack = _aircraft addAction ["Unfold Aircraft", "airunpack.sqf"];
airpack.sqf
_aircraft = _this select 0;
_caller = _this select 1;
_id = _this select 2;
_type = typeof _aircraft;
waituntil {!isEngineOn _aircraft};
switch (_type) do {
case "AH1Z": {_xtype = [_aircraft,0] execvm "\ca\air\Scripts\AH1Z_fold.sqf"};
case "UH1Y": {_xtype = [_aircraft,0] execvm "\ca\air2\UH1Y\Scripts\fold.sqf"};
case "MV22": {_xtype = [_aircraft,0] execvm "\ca\air2\mv22\scripts\pack.sqf"};
};
_aircraft removeaction _id;
_aircraftpack = _aircraft addAction ["Fold Aircraft", "airpack.sqf"];
in place of "unfold aircraft" or "fold aircraft" you can put whatever you want to show up in the action menu
as far as the files, i put them in the mission root folder (with mission.sqm ect...)
BTW, thanks to ghost for helping me with this!
Sorry to necro an old thread, but this is directly related to what I am trying to do, as I am trying to prevent this kind of stuff from happening:
It works for me but I didn't know you could fly whit the MV22 folded (http://www.dailymotion.com/user/cestcomi/video/xa23gx_gfdsarma2-mv22-funny_videogames)
I thought I might try the "engine" eventhandler code, placing this in the vehicle's config entry
class eventhandlers {
engine = "_this execVM ""\TGW_VehFixes\scr\MV22_folded.sqf""";
};
The code itself went like this
_mv22 = _this select 0;
while { _mv22 animationphase "turn_wing" !=0} do {_mv22 engineOn false};
Unfortunately this appears to do absolutely nothing. I don't want to use an "init" eventhandler because the code would be checking constantly, and it only needs to be checked when someone tries to turn the engines on (and automatically shut them off if the rotor is folded).
I also tried the following code
_mv22 = _this select 0;
while {_mv22 animationphase "turn_wing" !=0} do {_mv22 setVelocity [0,0,0]};
Which actually works at preventing the player from moving, but doesn't remove the sillyness of the rotors spinning when they clearly shouldn't. It looks even dumber on the AH-1Z and UH-1Y as they suddenly sprout an extra set of rotors.
I am very much a n00b when it comes to scripting, so I would really appreciate it if someone could help me out here.
Liquidpinky
May 5 2011, 22:08
Which actually works at preventing the player from moving, but remove the sillyness of the rotors spinning when they clearly shouldn't. It looks even dumber on the AH-1Z and UH-1Y as they suddenly sprout an extra set of rotors.
I am very much a n00b when it comes to scripting, so I would really appreciate it if someone could help me out here.
this setFuel 0 then check if they are unfolded then
this setFuel 1
You mean like this?
_mv22 = _this select 0;
while {_mv22 animationphase "turn_wing" !=0} do {_mv22 setFuel 0};
while {_mv22 animationphase "turn_wing" == 1} do {_mv22 setFuel 1};
Unfortunatly that doesn't seem to work right. setFuel, it seems, directly sets the total amount of fuel available; just 1 wouldn't be enough. Additionally, this would allow someone to refuel the aircraft "for free" simply by packing and then unpacking the rotors.
smile04
Sep 30 2011, 20:03
ok here is how i did the scripts to fold and unfold stuff
to start folded put this in the vehicles init
_xtype = [this,0] execvm "airpack.sqf"
to start unfolded use this
_xtype = [this,0] execvm "airunpack.sqf"
i edited the sqfs to look like this
airpack.sqf
_aircraft = _this select 0;
_caller = _this select 1;
_id = _this select 2;
_type = typeof _aircraft;
waituntil {!isEngineOn _aircraft};
switch (_type) do {
case "AH1Z": {_xtype = [_aircraft,1] execvm "\ca\air\Scripts\AH1Z_fold.sqf"};
case "UH1Y": {_xtype = [_aircraft,1] execvm "\ca\air2\UH1Y\Scripts\fold.sqf"};
case "MV22": {_xtype = [_aircraft,1] execvm "\ca\air2\mv22\scripts\pack.sqf"};
};
_aircraft removeaction _id;
_aircraftunpack = _aircraft addAction ["Unfold Aircraft", "airunpack.sqf"];
airpack.sqf
_aircraft = _this select 0;
_caller = _this select 1;
_id = _this select 2;
_type = typeof _aircraft;
waituntil {!isEngineOn _aircraft};
switch (_type) do {
case "AH1Z": {_xtype = [_aircraft,0] execvm "\ca\air\Scripts\AH1Z_fold.sqf"};
case "UH1Y": {_xtype = [_aircraft,0] execvm "\ca\air2\UH1Y\Scripts\fold.sqf"};
case "MV22": {_xtype = [_aircraft,0] execvm "\ca\air2\mv22\scripts\pack.sqf"};
};
_aircraft removeaction _id;
_aircraftpack = _aircraft addAction ["Fold Aircraft", "airpack.sqf"];
in place of "unfold aircraft" or "fold aircraft" you can put whatever you want to show up in the action menu
as far as the files, i put them in the mission root folder (with mission.sqm ect...)
BTW, thanks to ghost for helping me with this!
thank a lot man this really works...very nicely :) I LOVE YA!
watch :) http://www.youtube.com/watch?v=N2syqt7Q_Sc
for noobs like me...you have to put (make) two files airpack.sqf and airunpack.sqf in the root of your unpacked mission (then open files in notepad) and copy content of first hal of code to airpack.sqf and second half to airunpack.sqf and both save...then it will work...yeha! :D
:Yay:
Odyseus
Sep 15 2012, 17:59
Hey guys! Is a list of all aircraft that can fold wings? i KNOW ALL THESES CAN . But are there other ones. If so what would be their line of code?
"AH1Z": {_xtype = [_aircraft,0] execvm "\ca\air\Scripts\AH1Z_fold.sqf"};
case "UH1Y": {_xtype = [_aircraft,0] execvm "\ca\air2\UH1Y\Scripts\fold.sqf"};
case "MV22": {_xtype = [_aircraft,0] execvm "\ca\air2\mv22\scripts\pack.sqf"};
Spades_Neil
Dec 19 2012, 08:23
Sorry to necro an old thread, but this is directly related to what I am trying to do, as I am trying to prevent this kind of stuff from happening:
I thought I might try the "engine" eventhandler code, placing this in the vehicle's config entry
class eventhandlers {
engine = "_this execVM ""\TGW_VehFixes\scr\MV22_folded.sqf""";
};
The code itself went like this
_mv22 = _this select 0;
while { _mv22 animationphase "turn_wing" !=0} do {_mv22 engineOn false};
Unfortunately this appears to do absolutely nothing. I don't want to use an "init" eventhandler because the code would be checking constantly, and it only needs to be checked when someone tries to turn the engines on (and automatically shut them off if the rotor is folded).
I also tried the following code
_mv22 = _this select 0;
while {_mv22 animationphase "turn_wing" !=0} do {_mv22 setVelocity [0,0,0]};
Which actually works at preventing the player from moving, but doesn't remove the sillyness of the rotors spinning when they clearly shouldn't. It looks even dumber on the AH-1Z and UH-1Y as they suddenly sprout an extra set of rotors.
I am very much a n00b when it comes to scripting, so I would really appreciate it if someone could help me out here.
HUE HUE HUE NECRO
I'm trying to do the same thing. Here's my suggestion:
If possible, have the option to fold/unfold only available from outside of the vehicle. Make it not only fold the wings, but turn off the engine, AND lock the vehicle, AND kick out all occupants. To access the vehicle, you have to unlock it again from outside the vehicle.
Xeno426
Dec 19 2012, 16:20
This has already been solved in my TGW Vehicle Fixes thread. I made use of a variable that stored the current amount of fuel; when folded, the vehicle is emptied of fuel which prevents take-off. When unfolded, the fuel is returned.
Spades_Neil
Dec 19 2012, 19:31
This has already been solved in my TGW Vehicle Fixes thread. I made use of a variable that stored the current amount of fuel; when folded, the vehicle is emptied of fuel which prevents take-off. When unfolded, the fuel is returned.
Wait, is this a mod/addon or a script to vanilla? Because I can't do anything with a mod, unless it's a serverside addon that the clients don't need for it to work.
Regardless I still need the script I'm seeking. I don't really understand what is going on here and I don't know enough about scripting to know the syntax.
Xeno426
Dec 19 2012, 19:37
Wait, is this a mod/addon or a script to vanilla? Because I can't do anything with a mod, unless it's a serverside addon that the clients don't need for it to work.
Regardless I still need the script I'm seeking. I don't really understand what is going on here and I don't know enough about scripting to know the syntax.
Check out how I implemented it in my mod here (http://forums.bistudio.com/showthread.php?107589-TGW-Vehicle-Fixes). Defunkt is the guy that figured it out.
Spades_Neil
Dec 19 2012, 20:07
Check out how I implemented it in my mod here (http://forums.bistudio.com/showthread.php?107589-TGW-Vehicle-Fixes). Defunkt is the guy that figured it out.
I'm not understanding how this thread helps me. This is an addon. I don't want a whole addon. I just want a script. If I have a whole addon it means I have to force players playing on my mission to also have the addon.
I just want the script to open and close the folding wings on vehicles that can without making it possible to still turn on the engines.
Xeno426
Dec 19 2012, 20:18
Step 1) Download my addon
Step 2) Extract the config.cpp file
Step 3) Look at how it was implemented in my mod
Step 4) ????
Step 5) Profit.
Spades_Neil
Dec 19 2012, 21:35
Step 1) Download my addon
Step 2) Extract the config.cpp file
Step 3) Look at how it was implemented in my mod
Step 4) ????
Step 5) Profit.
Nevermind. You seem to have this idea that I have the faintest clue what I'm doing here. PBO extracting programs break on my computer, and even if I got it open and extracted the config.cpp file, I have absolutely no idea what the syntax means, so this information is useless to me going through lines of script I don't understand. The objective is to have someone explain it to me so I do understand the syntax.
panther42
Dec 20 2012, 02:51
Here's a simple explanation of what Xeno426 is talking about:
Check if the engine is running
Check animation phase of wing/rotor
Check if player is driver
Check if speed of vehicle is 0
if packed, use a global variable to track stowed fuel, while setting fuel to 0. Cannot start engine w/o fuel/variable check
This is added via his mod to all MV-22, AH1Z and UH1Y
Powered by vBulletin® Version 4.2.0 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.