Author: Celery
Author Website:

Requirements: No addons required

Version: 1.0

Short description:

Date: 2009-11-27 21:17


Comments: (2)
Rating:



 





EasyFly
by
Celery


Description:
The EasyFly script is back for revenge, making plane controls more responsive and generally easier to handle! It's not meant to be realistic, instead it aims to make flying easier and more fun for everyone.

The script has slightly changed from Armed Assault: values are now dependent on the plane's config and a smooth transition from zero to full effect has been added. Osprey (vtol=3) isn't supported because EasyFly wrecks its unique flight model and we don't want that to happen.

What the script does:
    - Rudder has more authority, continuing turns indefinitely
    - Aiming is easier
    - Taking off is easier
    - Stalling your plane isn't as easy as before
    - Stalls are easier to recover
    - UAVs are much easier to fly manually
The principle behind the script is to blend the plane's direction and movement vectors to reduce inertia, making the plane fly where its nose is pointing. It can be executed anywhere as long as it's done only once.


Usage:
The sample mission which you can download from below can be used as an example. Use radio command Alpha to disable the script for comparison purposes and turn it back on with Bravo.

Here is the script itself:
//EasyFly script for Armed Assault by Celery, SQF conversion by i0n0s, tweaked by rocko
//ARMA 2 script version by Celery
//
//Tweaks airplane movement vector to match its direction vector, making flying easier.
//Basic principle: average of direction vector plus movement vector times inertia value.
//The effect smoothly diminishes when it gets nearer to the stall speed which is 65% of
//landingSpeed in the plane's config.
//Smaller _inertia value means more absolute steering.
//
//Can be disabled serverside with CLY_easyfly_script_disabled=true
////////////////////////////////////////////////////////////////////////////////////////

CLY_easyfly_script=true;
sleep 1;

if (isNil "CLY_easyfly_script_disabled") then {CLY_easyfly_script_disabled=false};
private ["_fullspeed","_stallspeed","_speedrange","_inertiaxy","_inertiaz"];

while {true} do
	{
		if (vehicle player isKindOf "Plane" and alive player) then
		{
			_fullspeed=getNumber (configFile/"CfgVehicles"/(typeOf vehicle player)
/"landingSpeed")*1;
			_stallspeed=getNumber (configFile/"CfgVehicles"/(typeOf vehicle player)
/"landingSpeed")*0.65;
			_speedrange=_fullspeed-_stallspeed;
			while {(player==driver vehicle player) and (damage vehicle player<1)} do
			{
				sleep 0.04;
				if (speed vehicle player<=_fullspeed and speed vehicle player>_stallspeed) then
				{
					_inertiaxy=7/((speed vehicle player-_stallspeed)/_speedrange);
					_inertiaz=4/((speed vehicle player-_stallspeed)/_speedrange)
				}
				else
				{
					_inertiaxy=7;
					_inertiaz=4
				};
				if (speed vehicle player>_fullspeed) then
				{
					_inertiaxy=7;
					_inertiaz=4
				};
				if ((speed vehicle player>_stallspeed) and !(CLY_easyfly_script_disabled) and
(getNumber (configFile/"CfgVehicles"/(typeOf vehicle player)/"vtol")<3)) then
				{
					vehicle player setVelocity [
					(((vectorDir vehicle player select 0)*((speed vehicle player)/3.6))+
((velocity vehicle player select 0)*_inertiaxy))/(_inertiaxy+1),
					(((vectorDir vehicle player select 1)*((speed vehicle player)/3.6))+
((velocity vehicle player select 1)*_inertiaxy))/(_inertiaxy+1),
					(((vectorDir vehicle player select 2)*((speed vehicle player)/3.6))+
((velocity vehicle player select 2)*_inertiaz))/(_inertiaz+1)
					];
				};
			};
		};
	};


Media:

Since my PC isn't very powerful a video isn't possible and I have no idea how EasyFly behaves in a proper PC so feedback is valuable. If it works well, an addon will be made.

Here's the EasyFly promotional video for Armed Assault, the concept has stayed the same:


Forum topic:
- BI forums




Enable javascript to be able to download from Armaholic please!



Tags: No tags