#sqf script not found

1 messages · Page 1 of 1 (latest)

ashen glade
#

Basically, I'm working on a mod. Instead of creating a composition, I'm trying to put one in a mod.

Code:

class CfgPatches {
    class A3EF {
        units[] = {"I_APC_Wheeled_03_RWS_AT"};
        weapons[] = {};
        requiredVersion = 1.82;
        requiredAddons[] = {"A3_Armor_F_Exp"};
    };
};

class CfgFunctions {
    class GC {
        class InitFns {
            class GorgonSetup {
                file = "\mod\gorgon_amv_rws_at.sqf";
                preInit = 1;
            };
        };
    };
};


class CfgVehicles {
    class I_APC_Wheeled_03_cannon_F;

    class I_APC_Wheeled_03_RWS_AT : I_APC_Wheeled_03_cannon_F {
        displayName = "Gorgon AMV (RWS AT)";
        author = "DrunkeN";
        scope = 2;
        scopeCurator = 2;
        scopeArsenal = 2;
        side = 2;
        faction = "IND_F";
        crew = "I_crew_F";

        class EventHandlers {
            init = "_this call GC_fnc_GorgonSetup;";
        };
    };
};

Directory:

mod.pbo
├── gorgon_amv_rws_at.sqf
└── config.cpp
#

Script:

params ["_vehicle"];

if (isServer) then {     
    _vehicle lockTurret [[0,0], true];      
    _vehicle lockTurret [[0], true];     
    _vehicle animate ["HideTurret", 1];   
    _vehicle animate ["showCamonetHull", 1];   

    _vehicle addWeaponTurret ["SmokeLauncher", [-1]]; 
    _vehicle addMagazineTurret ["SmokeLauncherMag", [-1]]; 
    _vehicle addMagazineTurret ["SmokeLauncherMag", [-1]];  

    _spawnPos = [getPos _vehicle select 0, getPos _vehicle select 1, (getPos _vehicle select 2) + 2];    
    _turretArray = [_spawnPos, 180, "I_LT_01_AT_F", INDEPENDENT] call BIS_fnc_spawnVehicle;    
    _turret = _turretArray select 0;  

    _turret enableSimulationGlobal true;   
    _turret lockInventory true;    
    _turret lockDriver true;    
    _turret lockCargo true;    
    _turret setFuel 0; 
    
    _turret animate ["showCamonetHull", 1];   
    _turret animate ["showCamonetPlates1", 1];   
    _turret animate ["showCamonetPlates2", 1];   
   
    _turret addMagazineTurret ["100Rnd_127x99_mag_Tracer_Red", [0]];   
    _turret addMagazineTurret ["100Rnd_127x99_mag_Tracer_Red", [0]];   
    _turret addMagazineTurret ["100Rnd_127x99_mag_Tracer_Red", [0]];   
    _turret addMagazineTurret ["100Rnd_127x99_mag_Tracer_Red", [0]];   
    _turret addMagazineTurret ["100Rnd_127x99_mag_Tracer_Red", [0]];   
    _turret addMagazineTurret ["100Rnd_127x99_mag_Tracer_Red", [0]];    
   
    _turret attachTo [_vehicle, [.5, 0.15, 0.25], "poklop_commander", true];    

    _vehicle addEventHandler ["Killed", {  
        params ["_unit"];  
        {  
            detach _x;  
            deleteVehicle _x;  
        } forEach attachedObjects _unit;  
    }]; 
 
    _vehicle addEventHandler ["Deleted", {  
        params ["_unit"];  
        {  
            detach _x;  
            deleteVehicle _x;  
        } forEach attachedObjects _unit;  
    }]; 
};
#

Any help is welcome. I'm not good at coding, but I'll do my best to understand it.

full cave
#

The path to files within a mod is controlled by the PBO prefix (different to the PBO name) which is configured while packing the mod

ashen glade