Jump to content

Recommended Posts

Hi there, hey @Grumpy Old Man,

 

At first, this script is outstanding, thanks!

 

In my solitary tests where I'm hosting the mission and only I'm in the match, everything works fine. On the dedicated server, there are two odd reactions:

 

  1. The menu to open the loadout is cloned by the number of players in the game (image below);
  2. Not everyone sees all available aircraft in the left column within the HUD GOM (all aircraft are within the aircraft collection radius / some players can see the full list normally); 
  • PS: dedicated server was loaded with CBA+ACE, but the mission has no dependencies. No clue yet if no mods loaded on the server the mission behaviors change...

 

image.png

 

Code piece where I did the translation seen in the image:

//PATH: \tanks-and-helicopter-light.altis\vehicleLoadouts\functions\GOM_fnc_aircraftLoadoutInit.sqf


// A LOT OF CODE...

GOM_fnc_addAircraftLoadoutToObject = {

	params ["_object"];

	_action = ["EN: Edit aircraft loadout<br/>PT: Editar armamento da aeronave",{params ["_caller"];[_caller] spawn GOM_fnc_aircraftLoadout},[],0,true,true,"","_this isEqualTo vehicle _this AND {speed _this < 3} AND {alive _this} AND {alive _target}"];
	[_object,_action] remoteExec ["addAction",[0,-2] select isDedicated,true];//compatibility check added, and JIP

	true

};

// A LOT OF CODE...

 

What other modification did I do?

// GOM_fnc_aircraftLoadoutInit.sqf

_vehicles = (_obj nearEntities ["Air",400]) select {speed _x < 5 AND {alive _x} AND {isTouchingGround _x}}; // Line: 1952

// I've changed from 50 to 400.

and nothing more.

 

 

Mission description.ext

//BASIC CONFIGS
class Header {
	gameType 				= Coop;
	minPlayers				= 2;
	maxPlayers				= 18;
};
	// About
	onLoadName 				= "TANKS & CHOPPERS (LIGHT)";
	author 					= "thy";
	overviewPicture 		= "images\thumb.jpg";
	onLoadMission 			= "Clean the towns with armored and choppers.";
	
	// Gameplay
	joinUnassigned 			= 0;
	enableTeamSwitch		= false;
	respawn					= 3; 	
	respawnOnStart			= 1; 	
	respawnButton 			= 1;
	
	respawnDelay 			= 10;
	respawnTemplates[] 		= { "MenuPosition", "MenuInventory", "Wave" };
	respawnDialog 			= 0; 
	debriefing 				= 1;
	saving 					= 0;
	enableDebugConsole 		= 1; 
	
	// Performance
	DisabledAI				= 1; 
	corpseManagerMode 		= 1;
	corpseLimit 			= 10;
	corpseRemovalMinTime	= 600;
	corpseRemovalMaxTime 	= 600;
	wreckManagerMode 		= 1; 
	wreckLimit 				= 10;
	wreckRemovalMinTime 	= 1200;
	wreckRemovalMaxTime 	= 1200;
	
// CBA MOD
cba_settings_hasSettingsFile = 0;

// ROLES
#include "roles.hpp"

// ROLE LOADOUTS
class CfgRespawnInventory {
	// air team
	#include "loadouts\rolesLoadoutAirPilot.hpp"
	#include "loadouts\rolesLoadoutAirPilotDrone.hpp"
	// ground team	
	#include "loadouts\rolesLoadoutGroundCrew.hpp"
	#include "loadouts\rolesLoadoutGroundInfantryRM.hpp"
	#include "loadouts\rolesLoadoutGroundInfantryAR.hpp"
	#include "loadouts\rolesLoadoutGroundInfantryMD.hpp"
};

// T8AI (PART 1/2)
#include "T8\CONFIG.hpp"

class CfgFunctions {
	
	// T8AI (PART 2/2)
	#include "T8\FUNCTIONS.hpp"
	
	// VEHICLES RESPAWN
	#include "vehiclesRespawn\CfgFunctions.hpp"
	
	//GOM AIRCRAFTLOADOUT V1.35 (PART 1/2)
	#include "vehicleLoadouts\functions\GOM_fnc_functions.hpp"      //   <-------------------------------------------
};

//GOM AIRCRAFTLOADOUT V1.35 (PART 2/2)
class CfgCommunicationMenu
{
	#include "vehicleLoadouts\functions\GOM_fnc_aircraftLoadoutMenu.hpp"       //   <-------------------------------------------
};

#include "vehicleLoadouts\dialogs\GOM_dialog_parents.hpp"       //   <-------------------------------------------
#include "vehicleLoadouts\dialogs\GOM_dialog_controls.hpp"      //   <-------------------------------------------

 

Script files path in mission:

\tanks-and-helicopter-light.altis\vehicleLoadouts\functions\

image.png

\tanks-and-helicopter-light.altis\vehicleLoadouts\dialogs\

image.png

 

Mission init.sqf

if (!isDedicated) then 
{ 
	waitUntil
	{ 
		!isNull player;
	};
	[] call compile preProcessFileLineNumbers "briefing.sqf";
};

if (hasInterface) then
{
	[] spawn
	{
        waitUntil
		{
			sleep 0.1;	
			!isNull player;	
		};
	};
};

 

Mission initPlayerLocal.sqf

// PLAYERS LOADOUTS
["InitializePlayer", [player, true]] call BIS_fnc_dynamicGroups; // plus, look the initServer.sqf

// VEHICLE ROLE RESTRICTIONS
"vehiclesRestriction.sqf" remoteExec ["BIS_fnc_execVM"];

// MAINBASES PROTECTION
execVM "mainBasesProtection.sqf";

// VEHICLE OVERHAULING
execVM "vehiclesOverhauling.sqf";

 

Mission initServer.sqf

// ENVIRONMENT RANDOMIZER
"environmentRandomizer.sqf" remoteExec ["BIS_fnc_execVM"];

// PLAYERS LOADOUTS
["Initialize", [true]] 	call BIS_fnc_dynamicGroups; // plus, look the initPlayerLocal.sqf
	// Air
	[west,"loadoutAirPilot"] 			call bis_fnc_addRespawnInventory;
	[west,"loadoutAirPilotDrone"] 		call bis_fnc_addRespawnInventory;
	// Ground
	[west,"loadoutGroundCrew"] 			call bis_fnc_addRespawnInventory;
	//[west,"loadoutGroundCrewDrone"] 	call bis_fnc_addRespawnInventory;
	[west,"loadoutGroundInfantryAR"] 	call bis_fnc_addRespawnInventory;
	[west,"loadoutGroundInfantryMD"] 	call bis_fnc_addRespawnInventory;
	[west,"loadoutGroundInfantryRM"] 	call bis_fnc_addRespawnInventory;

// REMOVING SOME UNWANTED ASSETS FROM MAP
private _allTerrainObjects = nearestTerrainObjects
[
	[worldSize / 2, worldSize / 2],
	["POWERWIND","TRANSMITTER","POWERSOLAR","POWER LINES","FUELSTATION"],
	worldSize * sqrt 2 / 2,
	false
];
{ _x hideObjectGlobal true } forEach _allTerrainObjects;

// T8 EXECUTION
execVM "T8_missionEXEC.sqf";

 

 

Some clue about it?

What should I provide to make this easier?
The mission: https://steamcommunity.com/sharedfiles/filedetails/?id=2424050518 

 

Share this post


Link to post
Share on other sites

Hey everybody, I know this thread is a little dead but I can`t for the love of god make this work.

Everytime I try to use it outside of the test mission it spits this:

Script functions/controls/fn_GOMRscStructuredtext_1100.sqf not found

And because of this error the menu doesn`t open, where in tarnation is this file at?

Why heavens the same doesn`t occur in the mission. I am at loss for words

If anybody can help and if god help me, Grumpy Old Man would bless me with a little of his time.

Thanks ahead, don`t worry I be here checking at night waiting.

Share this post


Link to post
Share on other sites

Wow, awesome Script and exactly what I need. Nice Work and thanks for sharing.

Just a short question: I use this in the Mike Force Mode with Prairie Fire CDLC and additional Unsung Redux Stable Mod for serviceing the Jets.

 

Is there a possibillity to exclude some kind of Ammo tpyes?

In my case for example the "uns_pylonRack_1Rnd_Bomb_Napalm_500" will show up some mistakes on the Dedi Server and so I want to "ban" it before Pilot- & Copilot can load it in and crash in a extremly case the Server.

 

Thanks for your help.

 

Share this post


Link to post
Share on other sites

Hi everybody. Just got into the scripting side of arma3. So here is the question that i will crucified or shot for. After i paste the file contents into my new mission what then?

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

×