Jump to content

Recommended Posts

A very busy week,

What's new:

* Helicopter: play the whole scenario in a helicopter

* Playa Island: Begin the scenario from AdT like usual or switch to Playa Island

* Earn money to pay for fuel and repairs

* New readMe and Guidebook

The only thing I'm doing with [FTA] this week is playing!
... and, you know, taking notes for fixes and recording videos like this one,
 



I'll look forward to your feedback,

Have fun!

  • Like 2
  • Thanks 1

Share this post


Link to post
Share on other sites

I learn new things here every day. As I learn new things I try to incorporate these improvements to Fly Tanoa Air,

FTA 0042


*Organized folder stucture and assets


*Redesigned AWS (again)
AWS is now always functioning and the variable altWARN determines whether the system is switched on or not-- avoids double warning-- moved WARN controls to action menu and replaced with "AERO", see below.

old (altitude warning example)
 

Spoiler

altitude = [] spawn {
waitUntil {
    sleep 2;
    (getPos vehicle player) select 2 < 50
    };

if (ALTwarn==1) then {
    playSound ["vtolalarm", true];
    titleText ["WARNING", "Plain", 0.1];

sleep 1;
    titleText ["ALTITUDE", "Plain", 0.1];


sleep 2;
    ALTwarning = []execVM "AWS\ALTwarn.sqf";
    };
};

 


new

Spoiler

while {true} do {

if((getPos vehicle player) select 2 < 50 && altWARN==1) then {
    
titleText ["WARNING", "Plain", 0.1];
    playSound ["vtolalarm", true];
sleep 1.2;
titleText ["ALTITUDE", "Plain", 0.1];
sleep 2.5;
    };

sleep 0.5
};

 


*Redesigned switching to Playa Island
it works better with fewer parts


*Redesigned Boat Rescue
It actually works now

old version

Spoiler

call {

if (chall==0) exitWith {
//chat
    hint "Coastguard seeking assistance";
    radiotower sidechat "Control, Tanoa 2-6. Come in, 2-6.";
sleep 3;
    player sidechat "Tanoa 2-6. Copy, Tower.";
sleep 3;
playsound ["Orange_PhoneCall_Ringtone", true];
playTAB SetObjectTexture [0,"gpsMAPS\emergS.jpg"];
    radiotower sidechat "Control, Tanoa 2-6. The coastguard is asking all available aircraft to join in the search for a fishing trawler in distress.";
sleep 3;
    player sidechat "Copy, control. Tanoa 2-6 enroute. Any more details about the boat, Control?";

//function
searchZONE= [xCENTRE, xCENTRE_1, xCENTRE_2, xCENTRE_3, xCENTRE_4] call BIS_fnc_selectRandom;
    centreMARK setpos (getpos searchZONE);
sleep 2;
    detach chopper1;
    ["task1",[centreMARK,true]] call BIS_fnc_taskSetDestination;
    chopperGRP = group chopper1d;
sleep 1;
    playergroup = group Player;
    deleteWaypoint [playergroup, 0];

searchWP = chopperGRP addWaypoint [(getPos centreMARK), 0];
searchWP setWaypointType "loiter";
    [chopperGRP, 0] setWaypointLoiterRadius 1200;
sleep 2;
emergZONE= [xscene, xscene_1, xscene_2, xscene_3, xscene_4] call BIS_fnc_selectRandom;
sleep 1;
    boatMARK setpos (getpos emergZONE);
chall=4;

//chat fin
    radioTower sidechat "Roger that, 2-6. Spiridova Vadim is a blue fishing trawler. May be emitting smoke. Good luck, 2-6. Tower stand-by.";
hint "";
chall=4;
};

if (chall==4) exitWith {
    chopperGRP = group chopper1d;
    deleteWaypoint [chopperGRP, 0];
    chopper1 setpos (getpos chopperMARKdef);

sleep 1;
    [chopper1, chopperMARKdef, true] call BIS_fnc_attachToRelative;

sleep 1;
    boatMARK setpos (getpos limbo);
    centreMARK setpos (getpos limbo);
    wpMARK= airportMARK1;
    destination= []execVM "controlDEST.sqf";
chall=0;
    };
};

 


new version

Spoiler

call {

if (chall==0) exitWith {

chall=4;

//function
searchZONE= [xCENTRE, xCENTRE_1, xCENTRE_2, xCENTRE_3, xCENTRE_4] call BIS_fnc_selectRandom;
    centreMARK setpos (getpos searchZONE);
sleep 0.5;

emergZONE= [xscene, xscene_1, xscene_2, xscene_3, xscene_4] call BIS_fnc_selectRandom;
    boatMARK setpos (getpos emergZONE);

chopper1= createVehicle ["B_Heli_transport_01_F", centreMARK getPos[ 100, getdir centreMARK ], [], 0, "FLY" ];

    chopper1 allowDamage false;
    createVehicleCrew chopper1;
groupH = group driver chopper1;

{_x allowdamage False;} foreach units group (driver chopper1);


searchWP = groupH addWaypoint [(getPos centreMARK), 0];
searchWP setWaypointType "loiter";
    searchWP setWaypointSpeed "LIMITED";
    groupH setBehaviour "careless";
    [groupH, 0] setWaypointLoiterRadius 1200;

chopper1 flyInHeightASL [180, 180, 80];
chopper1 flyinheight 80;

chopper1 addeventhandler ["Fuel", {
    (_this select 0) setfuel 1;
}];

sleep 0.2;
    playergroup = group player;
    deleteWaypoint [playergroup, 0];
["task1",[centreMARK,true]] call BIS_fnc_taskSetDestination;

//chat
    radiotower sidechat "Control, Tanoa 2-6. Come in, 2-6.";
sleep 3;
    player sidechat "Tanoa 2-6. Copy, Tower.";

//mobile alert
playsound ["Orange_PhoneCall_Ringtone", true];
playTAB SetObjectTexture [0,"gpsMAPS\emergS.jpg"];

sleep 3;

    radiotower sidechat "Control, Tanoa 2-6. The coastguard is asking all available aircraft to join in the search for a fishing trawler in distress.";

//newsbanner

[
    parseText "<t size='2'>AAN live in Tanoa</t>",
    parseText "Search expands for Fishing vessel, Spiridova Vadim, missing for two days. Coast guard now soliciting local pilots to join in the search. Do you think you are psychic? If you think you are psychic, maybe you are. Call Third Eye now to find out more. Local businesses closing due to labor shortage in Eastern Tanoa. Men moving to the mainland for work, report says. Smuggling activity hits all new high as island residents turn to crime to survive. Police captain charged after corruption scandal breaks involving dozens of officials in Georgetown."] spawn BIS_fnc_AAN;

sleep 3;
    player sidechat "Copy, control. Tanoa 2-6 enroute. Any more details about the boat, Control?";
sleep 3;
    radioTower sidechat "Roger that, 2-6. Spiridova Vadim is a blue fishing trawler. May be emitting smoke. Good luck, 2-6. Tower stand-by."; 

sleep 10;

(uiNamespace getVariable "BIS_AAN") closeDisplay 1;

};

if (chall==4) exitWith {
    chall=0;

    {deleteVehicle _x;}forEach units groupH;
    deletegroup groupH;
    deleteVehicle chopper1;

    boatMARK setpos (getpos limbo);
    centreMARK setpos (getpos limbo);
    wpMARK= airportMARK1;
    destination= []execVM "controlDEST.sqf";

[
    parseText "<t size='2'>AAN live in Tanoa</t>",
    parseText "Local hero pilot located a wayward ship missing at sea. Rescue operations are currently underway. Please stay tuned for more information about this story as it becomes available. Economics: Men moving to the mainland for work, report says. Smuggling activity hits all new high as island residents turn to crime to survive. Police captain charged after corruption scandal breaks involving dozens of officials in Georgetown."] spawn BIS_fnc_AAN;
sleep 16;
(uiNamespace getVariable "BIS_AAN") closeDisplay 1;
    };
};

 


*Redesigned AddActions
Now the action menu looks and functions better, prioritizing actions like "Menu" and "Warn"


*Added "AERO" button on the GUI for "Aerobatics".
Toggle on/off to Search for ring courses because it's annoying to engage a course when you didn't mean to. Also get hints as to the locations.


*Added "Paint" action so you can re-paint Tanoa 2-6 (helo or plane) before taking off.


*Choose Playa Island or Aeroport de Tanoa before choosing vehicles. Choose vehicle and paint color before starting the engine.

Gimme color codes of your favorite colors or textures you think will work on with Tanoa 2-6!

438077-1566760251.jpg

 

Have fun!

  • Like 2
  • Thanks 1

Share this post


Link to post
Share on other sites

Nice updates wogz !

 

Keep up the good work and the positive think !

 

  • Like 2

Share this post


Link to post
Share on other sites
Posted (edited)

This is the most complicated script I've ever written. Take a look and we'll discuss below a bit,

buySTUFF.sqf

Spoiler

if (ap1 !=0 && commVEH==0) exitWith {

buyREPAIR=[ 
 player, 
 "Repair Damage (BUY $300)", 
 "\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_connect_ca.paa", 
 "\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_connect_ca.paa", 
 "(getDammage vehicle player) > 0", 
 "(player getvariable ""money"")>299", 
 {}, 
 {}, 
 { 

_this call fnc_moneyminusNV;
    systemChat "Repairing...";
sleep 3;
    playerJET setDamage 0;
    systemChat "Damage repaired";

}, 
 {}, 
 [], 
 2, 
 0, 
 false, 
 true 
] call BIS_fnc_holdActionAdd;

buyFUEL=[ 
 player, 
 "Refuel (BUY $300)", 
 "\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_connect_ca.paa", 
 "\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_connect_ca.paa", 
 "(fuel vehicle player) < 0.4", 
 "(player getvariable ""money"")>299", 
 {}, 
 {}, 
 { 

_this call fnc_moneyminusNV;
    systemChat "Refueling...";
sleep 3;
    playerJET setFuel 1;
    systemChat "Fuel Tanks Full";

}, 
 {}, 
 [], 
 2, 
 0, 
 false, 
 true 
] call BIS_fnc_holdActionAdd;

buyORANGE=[ 
 player, 
 "Orange and White (BUY $100)", 
 "\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_connect_ca.paa", 
 "\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_connect_ca.paa", 
 "currentColor !=1 ", 
 "(player getvariable ""money"")>99", 
 {}, 
 {}, 
 { 

_this call fnc_moneyminus;

currentColor=0;
execVM "t26\color.sqf"; 

}, 
 {}, 
 [], 
 2, 
 0, 
 false, 
 true 
] call BIS_fnc_holdActionAdd;

buyBLACK=[ 
 player, 
 "Black and White (BUY $100)", 
 "\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_connect_ca.paa", 
 "\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_connect_ca.paa", 
 "currentColor !=2 ", 
 "(player getvariable ""money"")>99", 
 {}, 
 {}, 
 { 

_this call fnc_moneyminus;

currentColor=1;
execVM "t26\color.sqf"; 

}, 
 {}, 
 [], 
 2, 
 0, 
 false, 
 true 
] call BIS_fnc_holdActionAdd;

buyBLUE=[ 
 player, 
 "Blue and White (BUY $100)", 
 "\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_connect_ca.paa", 
 "\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_connect_ca.paa", 
 "currentColor !=3 ", 
 "(player getvariable ""money"")>99", 
 {}, 
 {}, 
 { 

_this call fnc_moneyminus;

currentColor=2;
execVM "t26\color.sqf"; 

}, 
 {}, 
 [], 
 2, 
 0, 
 false, 
 true 
] call BIS_fnc_holdActionAdd;

buyGreen=[ 
 player, 
 "Green and White (BUY $100)", 
 "\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_connect_ca.paa", 
 "\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_connect_ca.paa", 
 "currentColor !=4 ", 
 "(player getvariable ""money"")>99", 
 {}, 
 {}, 
 { 

_this call fnc_moneyminus;

currentColor=3;
execVM "t26\color.sqf"; 

}, 
 {}, 
 [], 
 2, 
 0, 
 false, 
 true 
] call BIS_fnc_holdActionAdd;

buyDEF=[ 
 player, 
 "Default Color (FREE)", 
 "\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_connect_ca.paa", 
 "\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_connect_ca.paa", 
 "alive player", 
 "currentColor !=0", 
 {}, 
 {}, 
 { 

currentColor=4;
execVM "t26\color.sqf"; 
}, 
 {}, 
 [], 
 2, 
 0, 
 false, 
 true 
] call BIS_fnc_holdActionAdd;

buyNV=[ 
 player, 
 "Night Vision Goggles (BUY $300)", 
 "\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_connect_ca.paa", 
 "\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_connect_ca.paa", 
 "pNV==0", 
 "(player getvariable ""money"")>299", 
 {}, 
 {}, 
 { 

_this call fnc_moneyminusNV;
systemChat "Night Vision Goggles";
player additem "NVGoggles"; player assignitem "NVGoggles";
pNV=1;

}, 
 {}, 
 [], 
 2, 
 0, 
 false, 
 true 
] call BIS_fnc_holdActionAdd;


};

if (ap1 !=0 && commVEH==1) exitWith {

buyREPAIR=[ 
 player, 
 "Repair Damage (BUY $300)", 
 "\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_connect_ca.paa", 
 "\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_connect_ca.paa", 
 "(getDammage vehicle player) > 0", 
 "(player getvariable ""money"")>299", 
 {}, 
 {}, 
 { 

_this call fnc_moneyminusNV;
    systemChat "Repairing...";
sleep 3;
    playerJET setDamage 0;
    systemChat "Damage repaired";

}, 
 {}, 
 [], 
 2, 
 0, 
 false, 
 true 
] call BIS_fnc_holdActionAdd;

buyFUEL=[ 
 player, 
 "Refuel (BUY $300)", 
 "\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_connect_ca.paa", 
 "\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_connect_ca.paa", 
 "(fuel vehicle player) < 0.4", 
 "(player getvariable ""money"")>299", 
 {}, 
 {}, 
 { 

_this call fnc_moneyminusNV;
    systemChat "Refueling...";
sleep 3;
    playerJET setFuel 1;
    systemChat "Fuel Tanks Full";

}, 
 {}, 
 [], 
 2, 
 0, 
 false, 
 true 
] call BIS_fnc_holdActionAdd;

buyORANGE=[ 
 player, 
 "Orange (BUY $100)", 
 "\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_connect_ca.paa", 
 "\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_connect_ca.paa", 
 "currentColor !=1 ", 
 "(player getvariable ""money"")>99", 
 {}, 
 {}, 
 { 

_this call fnc_moneyminus;

currentColor=0;
execVM "t26\color.sqf"; 

}, 
 {}, 
 [], 
 2, 
 0, 
 false, 
 true 
] call BIS_fnc_holdActionAdd;

buyBLACK=[ 
 player, 
 "Black (BUY $100)", 
 "\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_connect_ca.paa", 
 "\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_connect_ca.paa", 
 "currentColor !=2", 
 "(player getvariable ""money"")>99", 
 {}, 
 {}, 
 { 

_this call fnc_moneyminus;

currentColor=1;
execVM "t26\color.sqf"; 


}, 
 {}, 
 [], 
 2, 
 0, 
 false, 
 true 
] call BIS_fnc_holdActionAdd;

buyBLUE=[ 
 player, 
 "Blue (BUY $100)", 
 "\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_connect_ca.paa", 
 "\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_connect_ca.paa", 
 "currentColor !=3", 
 "(player getvariable ""money"")>99", 
 {}, 
 {}, 
 { 

_this call fnc_moneyminus;

currentColor=2;
execVM "t26\color.sqf"; 

}, 
 {}, 
 [], 
 2, 
 0, 
 false, 
 true 
] call BIS_fnc_holdActionAdd;

buyGreen=[ 
 player, 
 "Green (BUY $100)", 
 "\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_connect_ca.paa", 
 "\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_connect_ca.paa", 
 "currentColor !=4 && commVEH==0", 
 "(player getvariable ""money"")>99", 
 {}, 
 {}, 
 { 

_this call fnc_moneyminus;

currentColor=3;
execVM "t26\color.sqf"; 

}, 
 {}, 
 [], 
 2, 
 0, 
 false, 
 true 
] call BIS_fnc_holdActionAdd;

buyDEF=[ 
 player, 
 "Default Color (FREE)", 
 "\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_connect_ca.paa", 
 "\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_connect_ca.paa", 
 "commVEH==0", 
 "currentColor !=0", 
 {}, 
 {}, 
 { 

playerJET setObjectTextureGlobal [0,"#(argb,8,8,3)color(0.518,0.519,0.455,0.2)"];


currentColor=4;
execVM "t26\color.sqf"; 

}, 
 {}, 
 [], 
 2, 
 0, 
 false, 
 true 
] call BIS_fnc_holdActionAdd;

buyNV=[ 
 player, 
 "Night Vision Goggles (BUY $300)", 
 "\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_connect_ca.paa", 
 "\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_connect_ca.paa", 
 "pNV==0 && commVEH==0", 
 "(player getvariable ""money"")>299", 
 {}, 
 {}, 
 { 

_this call fnc_moneyminusNV;
systemChat "Night Vision Goggles";
player additem "NVGoggles"; player assignitem "NVGoggles";
pNV=1;

}, 
 {}, 
 [], 
 2, 
 0, 
 false, 
 true 
] call BIS_fnc_holdActionAdd;


};

if (ap1 ==0) exitWith {

player removeAction buyRepair;
player removeAction buyFuel;
player removeAction buyNV;
player removeAction buyORANGE;
player removeAction buyBLACK;
player removeAction buyBLUE;
player removeAction buyGREEN;
player removeAction buyDEF;

};

 


What does it do?
This script adds 8 actions when the player enters an airport terminal area. The first two allow paying for fuel and repair (you didn't think that would be free forever, did you!?), the next 5 allow buying color changes and the final addAction is to buy NV goggles (necessary for nighttime bush-landings).

We call the color script instead of completing the function within the action because the color swap mechanic is used for another purpose already. Plus it's less code in an already super-long script.

Complicating factors are: the helicopter (requires it's own set of scripts and conditions), the syntax of the conditions (especially this one: "(player getvariable ""money"")>299"), presenting the actions in a comprehensible way.

color.sqf

Spoiler

call {

if (commVEH==0) exitWith {

currentCOLOR=currentCOLOR+1;
colorPICK= ["NULL", "Orange and White", "Black and White", "Blue and White", "Green and White", "Default"] select currentCOLOR;

switch (currentCOLOR) do
{
    case 1:
    {
systemChat format ["%1", colorPICK];

playerJET setObjectTextureGlobal [0,"#(rgb,8,8,3)color(1,1,1,0.5)"];//fuselage
playerJET setObjectTextureGlobal [1,"#(rgb,8,8,3)color(0.955,0.516,0,0.5)"];//wings
playerJET setObjectTextureGlobal [2,"#(rgb,8,8,3)color(0.255,0.255,0.255,0.5)"];//interior

    };
    case 2:
    {

systemChat  format ["%1", colorPICK];

playerJET setObjectTextureGlobal [0,"#(rgb,8,8,3)color(0.816,0.816,0.816,0.5)"];//altWHITE
playerJET setObjectTextureGlobal [1,"#(rgb,8,8,3)color(0,0,0,0.5)"];
playerJET setObjectTextureGlobal [2,"#(rgb,8,8,3)color(0.215,0.215,0.245,0.5)"];//altBLACK
    };
    case 3:
    {

hint format ["%1", colorPICK];

playerJET setObjectTextureGlobal [0,"#(rgb,8,8,3)color(0.816,0.816,0.816,0.5)"];//altWHITE
playerJET setObjectTextureGlobal [1,"#(rgb,8,8,3)color(0.01,0.01,0.455,0.5)"];//blue
playerJET setObjectTextureGlobal [2,"#(rgb,8,8,3)color(0.856,0.856,0.898,0.5)"];//altWHITE

    };
    case 4:
    {
systemChat  format ["%1", colorPICK];

playerJET setObjectTextureGlobal [0,"#(rgb,8,8,3)color(0.816,0.816,0.816,0.5)"];//altWHITE
playerJET setObjectTextureGlobal [1,"#(rgb,8,8,3)color(0.01,255,0.01,0.5)"];//green
playerJET setObjectTextureGlobal [2,"#(rgb,8,8,3)color(0.215,0.215,0.245,0.5)"];//altBLACK
    };

    case 5:
    {
systemChat  format ["%1", colorPICK];


playerJET setObjectTextureGlobal [0,"#(argb,8,8,3)color(0.518,0.519,0.455,0.2)"];

playerJET setObjectTextureGlobal [1,"#(argb,8,8,3)color(0.518,0.519,0.455,0.2)"];

playerJET setObjectTextureGlobal [2,"#(argb,8,8,3)color(0.518,0.519,0.455,0.2)"];
currentCOLOR=0;

    };

    case 0:
    {
hint "";

    };
};
};

if (commVEH==1) exitWith {

currentCOLOR=currentCOLOR+1;
colorPICK= ["NULL", "Orange", "Black", "Blue", "Green", "Default"] select currentCOLOR;

switch (currentCOLOR) do
{
    case 1:
    {
systemChat  format ["%1", colorPICK];

playerJET setObjectTextureGlobal [0,"#(rgb,8,8,3)color(0.955,0.516,0,0.5)"];


    };
    case 2:
    {

systemChat format ["%1", colorPICK];


playerJET setObjectTextureGlobal [0,"#(rgb,8,8,3)color(0,0,0,0.5)"];


    };
    case 3:
    {

systemChat format ["%1", colorPICK];


playerJET setObjectTextureGlobal [0,"#(rgb,8,8,3)color(0.01,0.01,0.455,0.5)"];


    };
    case 4:
    {
systemChat format ["%1", colorPICK];


playerJET setObjectTextureGlobal [0,"#(rgb,8,8,3)color(0.01,255,0.01,0.5)"];

    };

    case 5:
    {
systemChat format ["%1", colorPICK];


playerJET setObjectTextureGlobal [0,"#(argb,8,8,3)color(0.518,0.519,0.455,0.2)"];


currentCOLOR=0;

    };

    case 0:
    {
hint "";

    };
};
};

};

 


Here's a demo vid,


Have fun!

Edited by wogz187
there's a few mistakes in the helicopter section
  • Like 2
  • Thanks 1

Share this post


Link to post
Share on other sites
Posted (edited)

Interesting how these things come around full circle. This topic was originally titled "Mission in a Script", and the script was "nextFARE.sqf", the script which allows us to pick up and drop off passengers. You pick up a passenger and the script generates the location. I thought it was clever because it checked the player's location and assigned the destination airport randomly. It looked something like this,

nextFARE.sqf (OLD)
 

Spoiler

//if passenger but no airport
if (Pass==1 && AP1==0 && AP2==0 && AP3==0 && AP4==0 && AP5==0) then {
    hint "You already have a passenger.";
sleep 3;
    hint "";
    stophere = []execVM "NextFare.sqf";
    terminate stophere;
};

//Airport 1

if (Pass==0 && AP1==1 && AP2==0 && AP3==0 && AP4==0 && AP5==0) then {
passenger1 = [CIV1, CIV2, CIV3, CIV4] call BIS_fnc_selectRandom;
    passenger1 assignAsCargoIndex [playerJET, 0];
    passenger1 moveinCargo playerJET;
    pass=1;
    hint "You have a new passenger.";

sleep 1;

WPmark = [airportMARK2, airportMARK3, airportMARK4, airportMARK5] call BIS_fnc_selectRandom;

    playergroup = group Player;
    deleteWaypoint [playergroup, 0];
sleep 5;

NEXTWP = playergroup addWaypoint [(getPos WPmark), 0];
NEXTWP setWaypointType "hold";
    ControlAP setpos (getpos WPmark);
    DestinationTRIG setpos (getpos WPmark);
    [playergroup, 2] setWaypointCompletionRadius 5;
    hint "";
    AP1=0;
};

//Airport 2

if (Pass==0 && AP1==0 && AP2==1 && AP3==0 && AP4==0 && AP5==0) then {
passenger1 = [CIV1, CIV2, CIV3, CIV4] call BIS_fnc_selectRandom;
    passenger1 assignAsCargoIndex [playerJET, 0];
    passenger1 moveinCargo playerJET;
    pass=1;
    hint "You have a new passenger.";

sleep 1;

WPmark = [airportMARK1, airportMARK3, airportMARK4, airportMARK5] call BIS_fnc_selectRandom;

    playergroup = group Player;
    deleteWaypoint [playergroup, 0];
sleep 5;

NEXTWP = playergroup addWaypoint [(getPos WPmark), 0];
NEXTWP setWaypointType "hold";
    DestinationTRIG setpos (getpos WPmark);
    ControlAP setpos (getpos WPmark);
    [playergroup, 2] setWaypointCompletionRadius 5;
    hint "";
    AP2=0;
};

//Airport 3

if (Pass==0 && AP1==0 && AP2==0 && AP3==1 && AP4==0 && AP5==0) then {
passenger1 = [CIV1, CIV2, CIV3, CIV4] call BIS_fnc_selectRandom;
    passenger1 assignAsCargoIndex [playerJET, 0];
    passenger1 moveinCargo playerJET;
    pass=1;
    hint "You have a new passenger.";

sleep 1;

WPmark = [airportMARK1, airportMARK2, airportMARK4, airportMARK5] call BIS_fnc_selectRandom;

    playergroup = group Player;
    deleteWaypoint [playergroup, 0];
sleep 5;

NEXTWP = playergroup addWaypoint [(getPos WPmark), 0];
NEXTWP setWaypointType "hold";
    ControlAP setpos (getpos WPmark);
    DestinationTRIG setpos (getpos WPmark);
    [playergroup, 2] setWaypointCompletionRadius 5;
    hint "";
    AP3=0;
};

//Airport 4

if (Pass==0 && AP1==0 && AP2==0 && AP3==0 && AP4==1 && AP5==0) then {
passenger1 = [CIV1, CIV2, CIV3, CIV4] call BIS_fnc_selectRandom;
    passenger1 assignAsCargoIndex [playerJET, 0];
    passenger1 moveinCargo playerJET;
    pass=1;
    hint "You have a new passenger.";

sleep 1;

WPmark = [airportMARK1, airportMARK2, airportMARK3, airportMARK5] call BIS_fnc_selectRandom;

    playergroup = group Player;
    deleteWaypoint [playergroup, 0];
sleep 5;

NEXTWP = playergroup addWaypoint [(getPos WPmark), 0];
NEXTWP setWaypointType "hold";
    ControlAP setpos (getpos WPmark);
    DestinationTRIG setpos (getpos WPmark);
    [playergroup, 2] setWaypointCompletionRadius 5;
    hint "";
    AP4=0;
};

//Airport 5

if (Pass==0 && AP1==0 && AP2==0 && AP3==0 && AP4==0 && AP5==1) then {
passenger1 = [CIV1, CIV2, CIV3, CIV4] call BIS_fnc_selectRandom;
    passenger1 assignAsCargoIndex [playerJET, 0];    
    passenger1 moveinCargo playerJET;
    pass=1;
    hint "You have a new passenger.";

sleep 1;

WPmark = [airportMARK1, airportMARK2, airportMARK3, airportMARK4] call BIS_fnc_selectRandom;

    playergroup = group Player;
    deleteWaypoint [playergroup, 0];
sleep 5;

NEXTWP = playergroup addWaypoint [(getPos WPmark), 0];
NEXTWP setWaypointType "hold";
    ControlAP setpos (getpos WPmark);
    DestinationTRIG setpos (getpos WPmark);
    [playergroup, 2] setWaypointCompletionRadius 5;
    hint "";
    AP5=0;
};

//deliver passenger
if (Pass==1 && (AP1==1 or AP2==1 or AP3==1 or AP4==1 or AP5==1)) then {
    _list = fullCrew [ playerJET, "cargo" ] apply { _x select 0 };
    Passenger1 = _list select 0;
    moveOut passenger1;
    unassignvehicle passenger1;


    ["task1",[objNULL,false]] call BIS_fnc_taskSetDestination;
sleep 1;
    Passenger1 setpos (getpos Limbo);

    hint "Get a new Passenger.";
    pass=0;
stophere = []execVM "NextFare.sqf";
    terminate stophere;
};

 


The most remarkable part is that it worked at all.

So this brings us around to the start again. I rewrote nextFARE as functions to account for the increasing complexity of FTA. Check it out,

init.sqf

Spoiler

[] execvm "Features\nextFARE.sqf";
fnc_FARE =
{
if (chall==0) exitWith {
    [] call fnc_PassengerPlus;
    };

if (chall==1) exitWith {
    [] call fnc_PassengerMinus;
    };
};

 


Spawned by the "FARE" button on the Flight Control Menu,

action = "newPASS=[] spawn fnc_FARE";

using "spawn" here instead of "call" is crucial because the functions contain sleeps.
using "spawn" here instead of "call" is crucial because the functions contain sleeps.

nextFARE.sqf

Spoiler

fnc_passengerPLUS =
{

if (AP1 < 6 && AP1 !=0 && commVEH==0) exitWith {
    chall=1;
    closeDialog 0;
passenger1 = [CIV1, CIV2, CIV3, CIV4] call BIS_fnc_selectRandom;
sleep 1;
    hint "You have a new passenger.";
    passenger1 assignAsCargoIndex [playerJET, 0];
    passenger1 moveinCargo playerJET;
    destination= []execVM "controlPOS.sqf";
    };

//HELI
if (AP1 < 6 && AP1 !=0 && commVEH==1) exitWith {
    chall=1;
    closeDialog 0;
passenger1 = [CIV1, CIV2, CIV3, CIV4] call BIS_fnc_selectRandom;
sleep 1;
    hint "You have a new passenger.";
    passenger1 assignAsCargoIndex [playerJET, 0];
    passenger1 moveinCargo playerJET;
    destination= []execVM "controlPOS.sqf";
    };
};


fnc_passengerMINUS =
{
//passenger but no airport
if (AP1==0) exitWith {
    systemchat "You already have a passenger.";
    };

if (Dest==1 && AP1 < 6 && commVEH==0) exitWith {
    chall=0;
    DEST=0;
    _list = fullCrew [ playerJET, "cargo" ] apply { _x select 0 };
    Passenger1 = _list select 1;
    closeDialog 0;
sleep 1;
    moveOut passenger1;
    unassignvehicle passenger1;
sleep 1;
    Passenger1 setpos (getpos locationNULL);

    destinationTRIG setpos (getpos locationNULL);
    hint "Passenger Delivered to destination.";
    playergroup = group Player;
    deleteWaypoint [playergroup, 0];
    ["task1",[limbo,false]] call BIS_fnc_taskSetDestination;
sleep 3;
    [] call fnc_moneyplus;
    };

//HELI
if (Dest==1 && AP1 < 6 && commVEH==1) exitWith {
    chall=0;
    DEST=0;
    _list = fullCrew [ playerJET, "cargo" ] apply { _x select 0 };
    Passenger1 = _list select 0;
    closeDialog 0;
sleep 1;
    moveOut passenger1;
    unassignvehicle passenger1;
sleep 1;
    Passenger1 setpos (getpos locationNULL);

    destinationTRIG setpos (getpos locationNULL);
    hint "Passenger Delivered to destination.";
    playergroup = group Player;
    deleteWaypoint [playergroup, 0];
    ["task1",[limbo,false]] call BIS_fnc_taskSetDestination;
sleep 3;
    [] call fnc_moneyplus;
    };

//smugPLANE
if (Dest==1 && AP1== 6 && commVEH==0) exitWith {
    chall=0;
    DEST=0;
    closeDialog 0;

    _list = fullCrew [ playerJET, "cargo" ] apply { _x select 0 };
    Passenger1 = _list select 1;
sleep 1;
    moveOut passenger1;
    unassignvehicle passenger1;
sleep 1;
    Passenger1 setpos (getpos locationNULL);

    destinationTRIG setpos (getpos locationNULL);
    hint "Passenger Kidnapped for old man.";
    playergroup = group Player;
    deleteWaypoint [playergroup, 0];
    ["task1",[limbo,false]] call BIS_fnc_taskSetDestination;
sleep 3;
    playsound ["Orange_PhoneCall_Ringtone", true];
    playTAB SetObjectTexture [0,"gpsMAPS\gomHEAD.jpg"];
    GOM sidechat "Good work. Bring me more hostages.";
sleep 4;
    player sidechat "Yes, sir.";
    [] call fnc_moneyplusGOM;
    };

//smugHELI
if (Dest==1 && AP1== 6 && commVEH==1) exitWith {
    chall=0;
    DEST=0;
    closeDialog 0;

    _list = fullCrew [ playerJET, "cargo" ] apply { _x select 0 };
    Passenger1 = _list select 0;
sleep 1;
    moveOut passenger1;
    unassignvehicle passenger1;
sleep 1;
    Passenger1 setpos (getpos locationNULL);

    destinationTRIG setpos (getpos locationNULL);
    hint "Passenger Kidnapped for old man.";
    playergroup = group Player;
    deleteWaypoint [playergroup, 0];
    ["task1",[limbo,false]] call BIS_fnc_taskSetDestination;
sleep 3;
    playsound ["Orange_PhoneCall_Ringtone", true];
    playTAB SetObjectTexture [0,"gpsMAPS\gomHEAD.jpg"];
    GOM sidechat "Good work. Bring me more hostages.";
sleep 4;
    player sidechat "Yes, sir.";
    [] call fnc_moneyplusGOM;
    };
};

 


The version released tomorrow will bring this project around full circle-- it's actually a game now-- and begin the process of leaving beta.

Thanks for all your help,

Have fun!

Edited by wogz187
(yes the load function for the plane and the helicopter are identical-- was for testing because of the seating arrangement).
  • Like 1
  • Thanks 1

Share this post


Link to post
Share on other sites

Check out the changeLog, Dev Files, and readme.
 

What's new:

* Terminal Services (paint, repair, refuel)

* 2 off airport cargo destinations for good guys

* Abort Challenge action, Warning System toggle action

* Engine Malfunction and Engine Diagnostics
*HINT button on the Flight Control Menu
*Karma, Money, Skill attributes for player
*AERO button on Flight Control Menu for Aerobatic Ring Challenge hint and search
*Completely redesigned and rewrote core scripts
*Improved user interface

 

The next phase of FTA, which is already well underway, is to make each of the core components modular. For example,

In this version there are no airport triggers. In this version airports are determined by a marker which has an "Airport" in it's init properties. Add one of these blue markers to a map, any map, and you have an FTA airport ready to go. So that, but for all the components of the mod. Aircraft functions will likely also go in an arrow (or similar, a cube perhaps) so that any aircraft in proximity to the (invisible marker) will be granted FTA functions. Basically, the next update isn't an update to FTA at all but this mod will benefit from all the modular functions and serve as a Demo of those functions in the future.

No. But seriously,

Have fun!

 

 

438077-1567190636.jpg

  • Like 2

Share this post


Link to post
Share on other sites

Hope all the scripts using while for warnings and such do not break up the mission due to fps drops. Have been there recently. Had to change simple scripts because the mission lagged for 0,5 seconds everytime the loop occured. Not a very big issue but it was annoying so I spent an hour to find another way to make everything work.

  • Like 1
  • Thanks 1

Share this post


Link to post
Share on other sites

@JohnKalo,

Quote

Hope all the scripts using while for warnings and such do not break up the mission due to fps drops.


Yeah, me too! Especially since I've converted almost everything from trigger to proximity detection using while trues. That said, since the conversion, I haven't noticed any difference in FPS. There are additional conditions on those objects which may prevent them constantly checking proximity condition. But I don't know.

Guess we'll see.

Thanks, John!

Have fun!

  • Like 1
  • Thanks 1

Share this post


Link to post
Share on other sites

Separating the framework from FTA is a challenge but I've made a lot of progress. Check it out,

The Table of Contents from Airport Module functions.sqf,

Spoiler

 

AIRPORT FUNCTIONS:
fnc_proxyWARNING
fnc_traffic1
fnc_navAID
fnc_AtrafficControl
fnc_airport0
fnc_airport1
fnc_cargoSort
fnc_cargoUp
fnc_cargoDown
fnc_fare
fnc_passengerPlus
fnc_passengerMinus
fnc_GroundCrew
fnc_destinationRNDM
fnc_destination
fnc_towerCall

 

WORLD FUNCTIONS
fnc_beginBKGsound
fnc_weatherDYN
fnc_timeChange
fnc_weatherReport

 

VEHICLE FUNCTIONS
fnc_moneyPlus
fnc_moneyMinus
fnc_moneyMinusNV
fnc_abortButton
fnc_abort
fnc_warningSwitch
fnc_stall1
fnc_stall2
fnc_stalls

stallTERM
stallHEAT
stallALT

commitVehicle
engineDamage
engineDiag
upFlight
downFlight
AWS1

 

TERMINAL SERVICES

fnc_color
fnc_terminalSerives

BUY REPAIR
BUY REFUEL
BUY PAINT COLORS
BUY NV
BUY AIRCRAFT MANUAL
LOAD PASSENGER
DELIVER PASSENGER
TIME CHANGE

 

438077-1567532343.jpg

Through testing I have already delivered several passengers and cargo shipments around Altis. Setting up a new scenario with the pieces above takes about 5 minutes.

 

There are still a couple challenges ahead but I'm confident all will be sorted by Friday.

Have fun!

  • Like 1
  • Thanks 1

Share this post


Link to post
Share on other sites

I think this topic can be dead now and we'll move the discussion here,
 

Thanks all!

Have fun!

  • Like 2

Share this post


Link to post
Share on other sites

@JohnKalo was very correct,

Quote

Hope all the scripts using while for warnings and such do not break up the mission due to fps drops.

 
The warning system wasn't too bad. I didn't notice the FPS tank with just those few While Trues but after converting several area triggers to while true I immediately noticed a difference in performance. Thankfully converting back to triggers and wait until is relatively simple.

Thanks John!

  • Like 1

Share this post


Link to post
Share on other sites

Glad the issue was detected and fixed. Nicely done  :thumbsup:

Oh and are there any fire spotting missions coming? Like working for the firefighter department and such. Plane too small to put out big fires but it can help with the small ones. The chopper can too but it will need a bucket 3d model. And if willing to search for fire putting out mechanics we can discover the super compressed chemical which once spread can take out big fires. That way even the small plane can be used. 

 

 

  • Like 1

Share this post


Link to post
Share on other sites

@JohnKalo,

Quote

Oh and are there any fire spotting missions coming?

It's a great idea, I'll add it to the list of possible features. It's kind of a long list...

Currently FTA is being overhauled to incorporate the Fly Arma 3 Framework I posted this week. That framework also needs an update to account for the while true issue.  On top of that I'm adding extravehicular missions to FTA. One mission for hero path and one for smuggler path. If I get all that done and a stable release for Friday we'll look at fire missions.

Thanks, John!

*looks at frame-counter*

  • Like 1
  • Thanks 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

×