Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "basicdefines_A3.hpp"
- class DefaultEventhandlers;
- class WeaponFireGun;
- class WeaponCloudsGun;
- class WeaponFireMGun;
- class WeaponCloudsMGun;
- class CfgPatches
- {
- class chdefender_AddOn_Cars
- {
- units[]= {"chdefender"};
- weapons[]={};
- requiredVersion=0.1;
- requiredAddons[]={};
- };
- };
- class CfgSounds {
- sounds[] = {"chsgn","chsvl","chspn","chvlhr"};
- class chsgn {
- name = "chsgn";
- sound[] = {"Charlieco89_Defender\gn.ogg", 5, 1.0, 250};
- titles[] = {};
- };
- class chsvl {
- name = "chsvl";
- sound[] = {"Charlieco89_Defender\vl.ogg", 5, 1.0, 250};
- titles[] = {};
- };
- class chspn {
- name = "chspn";
- sound[] = {"Charlieco89_Defender\pn.ogg", 5, 1.0, 250};
- titles[] = {};
- };
- class chvlhr {
- name = "chvlhr";
- sound[] = {"Charlieco89_Defender\vlhr.ogg", 5, 1.0, 250};
- titles[] = {};
- };
- };
- class CfgFactionClasses
- {
- class chmods
- {
- displayName = "Charlieco89's Mods";
- priority = 8;
- side = 1;
- icon = "\Charlieco89_Defender\cars\data\textures\ch89.paa";
- };
- };
- class CfgVehicleClasses
- {
- class chPN
- {
- displayName = "Police Nationale";
- };
- class chGN
- {
- displayName = "Gendarmerie";
- };
- class chSP
- {
- displayName = "Sapeurs Pompiers";
- };
- };
- class CfgEditorSubcategories
- {
- class chPN
- {
- displayName = "Police Nationale";
- };
- class chGN
- {
- displayName = "Gendarmerie";
- };
- class chSP
- {
- displayName = "Sapeurs Pompiers";
- };
- };
- class cfgWeapons
- {
- class SportCarHorn;
- class chkla4: SportCarHorn
- {
- displayname="Airhorn";
- reloadTime=0;
- drySound[]=
- {
- "Charlieco89_Defender\klaxon4.ogg",
- 1,
- 1
- };
- scope=2;
- };
- class chpns: SportCarHorn
- {
- displayname="Sirène";
- reloadTime=0;
- drySound[]=
- {
- "Charlieco89_Defender\pn.ogg",
- 1,
- 1
- };
- scope=2;
- };
- class chgns: SportCarHorn
- {
- displayname="Sirène";
- reloadTime=0;
- drySound[]=
- {
- "Charlieco89_Defender\gn.ogg",
- 1,
- 1
- };
- scope=2;
- };
- class chvls: SportCarHorn
- {
- displayname="Sirène";
- reloadTime=0;
- drySound[]=
- {
- "Charlieco89_Defender\vl.ogg",
- 1,
- 1
- };
- scope=2;
- };
- class chvlhrs: SportCarHorn
- {
- displayname="Sirène";
- reloadTime=0;
- drySound[]=
- {
- "Charlieco89_Defender\vlhr.ogg",
- 1,
- 1
- };
- scope=2;
- };
- };
- class CfgVehicles
- {
- class Car;
- class Car_F: Car
- {
- class HitPoints /// we want to use hitpoints predefined for all cars
- {
- class HitLFWheel;
- class HitLF2Wheel;
- class HitRFWheel;
- class HitRF2Wheel;
- class HitBody;
- class HitGlass1;
- class HitGlass2;
- class HitGlass3;
- class HitGlass4;
- };
- class EventHandlers;
- class AnimationSources;
- };
- class chdefender_base: Car_F
- {
- model = "\Charlieco89_Defender\defender_m"; /// simple path to model
- picture = "\A3\soft_f_gamma\Hatchback_01\Data\UI\portrait_car_CA.paa";
- Icon = "\A3\soft_f_gamma\Hatchback_01\Data\UI\map_car_CA.paa";
- selectionBrakeLights = "brzdove svetlo";
- selectionBackLights = "zadni svetlo";
- displayName = "chdefender_base"; /// displayed in Editor
- hiddenSelections[] = {"camo1","camo2","camo3","lock1","lock2","lock3","target1","target2","target3","patrol1","patrol2","patrol3","avert1","avert2"};
- terrainCoef = 2.0; /// different surface affects this car more, stick to tarmac
- turnCoef = 2.5; /// should match the wheel turn radius
- precision = 10; /// how much freedom has the AI for its internal waypoints - lower number means more precise but slower approach to way
- brakeDistance = 3.0; /// how many internal waypoints should the AI plan braking in advance
- acceleration = 15; /// how fast acceleration does the AI think the car has
- fireResistance = 5; /// lesser protection against fire than tanks
- armor = 120; /// just some protection against missiles, collisions and explosions
- cost = 50000; /// how likely is the enemy going to target this vehicle
- transportMaxBackpacks = 3; /// just some backpacks fit the trunk by default
- transportSoldier = 4; /// number of cargo except driver
- /// some values from parent class to show how to set them up
- wheelDamageRadiusCoef = 0.9; /// for precision tweaking of damaged wheel size
- wheelDestroyRadiusCoef = 0.4; /// for tweaking of rims size to fit ground
- maxFordingDepth = 0.5; /// how high water would damage the engine of the car
- waterResistance = 1; /// if the depth of water is bigger than maxFordingDepth it starts to damage the engine after this time
- crewCrashProtection = 0.25; /// multiplier of damage to crew of the vehicle => low number means better protection
- driverLeftHandAnimName = "drivewheel"; /// according to what bone in model of car does hand move
- driverRightHandAnimName = "drivewheel"; /// beware, non-existent bones may cause game crashes (even if the bones are hidden during play)
- class AnimationSources;
- class TransportItems /// some first aid kits in trunk according to safety regulations
- {
- item_xx(FirstAidKit,4);
- };
- class Turrets{}; /// doesn't have any gunner nor commander
- class HitPoints: HitPoints
- {
- class HitLFWheel: HitLFWheel {armor=0.125; passThrough=0;}; /// it is easier to destroy wheels than hull of the vehicle
- class HitLF2Wheel: HitLF2Wheel {armor=0.125; passThrough=0;};
- class HitRFWheel: HitRFWheel {armor=0.125; passThrough=0;};
- class HitRF2Wheel: HitRF2Wheel {armor=0.125; passThrough=0;};
- class HitFuel {armor=0.50; material=-1; name="fueltank"; visual=""; passThrough=0.2;}; /// correct points for fuel tank, some of the damage is aFRLied to the whole
- class HitEngine {armor=0.50; material=-1; name="engine"; visual=""; passThrough=0.2;};
- class HitBody: HitBody {name = "body"; visual="camo1"; passThrough=1;}; /// all damage to the hull is aFRLied to total damage
- class HitGlass1: HitGlass1 {armor=0.25;}; /// it is pretty easy to puncture the glass but not so easy to remove it
- class HitGlass2: HitGlass2 {armor=0.25;};
- class HitGlass3: HitGlass3 {armor=0.25;};
- class HitGlass4: HitGlass4 {armor=0.25;};
- };
- driverAction = driver_low01; /// what action is going the driver take inside the vehicle. Non-existent action makes the vehicle inaccessible
- cargoAction[]=
- {
- "passenger_low01",
- "passenger_low01",
- "passenger_low01",
- "passenger_low01"
- };
- getInAction = GetInLow; /// how does driver look while getting in
- getOutAction = GetOutLow; /// and out
- cargoGetInAction[] = {"GetInLow"}; /// and the same for the rest, if the array has fewer members than the count of crew, the last one is used for the rest
- cargoGetOutAction[] = {"GetOutLow"}; /// that means all use the same in this case
- #include "sounds.hpp" /// sounds are in a separate file to make this one simple
- #include "pip.hpp" /// PiPs are in a separate file to make this one simple
- #include "physx.hpp" /// PhysX settings are in a separate file to make this one simple
- class PlayerSteeringCoefficients /// steering sensitivity configuration
- {
- turnIncreaseConst = 0.3; // basic sensitivity value, higher value = faster steering
- turnIncreaseLinear = 1.0; // higher value means less sensitive steering in higher speed, more sensitive in lower speeds
- turnIncreaseTime = 1.0; // higher value means smoother steering around the center and more sensitive when the actual steering angle gets closer to the max. steering angle
- turnDecreaseConst = 5.0; // basic caster effect value, higher value = the faster the wheels align in the direction of travel
- turnDecreaseLinear = 3.0; // higher value means faster wheel re-centering in higher speed, slower in lower speeds
- turnDecreaseTime = 0.0; // higher value means stronger caster effect at the max. steering angle and weaker once the wheels are closer to centered position
- maxTurnHundred = 0.7; // coefficient of the maximum turning angle @ 100km/h; limit goes linearly to the default max. turn. angle @ 0km/h
- };
- /// memory points where do tracks of the wheel appear
- // front left track, left offset
- memoryPointTrackFLL = "TrackFLL";
- // front left track, right offset
- memoryPointTrackFLR = "TrackFLR";
- // back left track, left offset
- memoryPointTrackBLL = "TrackBLL";
- // back left track, right offset
- memoryPointTrackBLR = "TrackBLR";
- // front right track, left offset
- memoryPointTrackFRL = "TrackFRL";
- // front right track, right offset
- memoryPointTrackFRR = "TrackFRR";
- // back right track, left offset
- memoryPointTrackBRL = "TrackBRL";
- // back right track, right offset
- memoryPointTrackBRR = "TrackBRR";
- class Damage /// damage changes material in specific places (visual in hitPoint)
- {
- tex[]={};
- mat[]=
- {
- "A3\data_f\glass_veh_int.rvmat", /// material mapped in model
- "A3\data_f\Glass_veh_damage.rvmat", /// changes to this one once damage of the part reaches 0.5
- "A3\data_f\Glass_veh_damage.rvmat", /// changes to this one once damage of the part reaches 1
- "A3\data_f\glass_veh.rvmat", /// another material
- "A3\data_f\Glass_veh_damage.rvmat", /// changes into different ones
- "A3\data_f\Glass_veh_damage.rvmat"
- };
- };
- class Exhausts /// specific exhaust effects for the car
- {
- class Exhaust1 /// the car has two exhausts - each on one side
- {
- position = "exhaust"; /// name of initial memory point
- direction = "exhaust_dir"; /// name of memory point for exhaust direction
- effect = "ExhaustsEffect"; /// what particle effect is it going to use
- };
- };
- class Reflectors /// only front lights are considered to be reflectors to save CPU
- {
- class LightCarHeadL01 /// lights on each side consist of two bulbs with different flares
- {
- color[] = {1900, 1800, 1700}; /// approximate colour of standard lights
- ambient[] = {5, 5, 5}; /// nearly a white one
- position = "LightCarHeadL01"; /// memory point for start of the light and flare
- direction = "LightCarHeadL01_end"; /// memory point for the light direction
- hitpoint = "Light_L"; /// point(s) in hitpoint lod for the light (hitPoints are created by engine)
- selection = "Light_L"; /// selection for artificial glow around the bulb, not much used any more
- size = 1; /// size of the light point seen from distance
- innerAngle = 100; /// angle of full light
- outerAngle = 179; /// angle of some light
- coneFadeCoef = 10; /// attenuation of light between the above angles
- intensity = 1; /// strength of the light
- useFlare = true; /// does the light use flare?
- dayLight = false; /// switching light off during day saves CPU a lot
- flareSize = 1.0; /// how big is the flare
- class Attenuation
- {
- start = 1.0;
- constant = 0;
- linear = 0;
- quadratic = 0.25;
- hardLimitStart = 30; /// it is good to have some limit otherwise the light would shine to infinite distance
- hardLimitEnd = 60; /// this allows adding more lights into scene
- };
- };
- class LightCarHeadL02: LightCarHeadL01
- {
- position = "LightCarHeadL02";
- direction = "LightCarHeadL02_end";
- FlareSize = 0.5; /// side bulbs aren't that strong
- };
- class LightCarHeadR01: LightCarHeadL01
- {
- position = "LightCarHeadR01";
- direction = "LightCarHeadR01_end";
- hitpoint = "Light_R";
- selection = "Light_R";
- };
- class LightCarHeadR02: LightCarHeadR01
- {
- position = "LightCarHeadR02";
- direction = "LightCarHeadR02_end";
- FlareSize = 0.5;
- };
- class PP1: LightCarHeadR01
- {
- position = "PP1";
- direction = "PP1_end";
- FlareSize = 1.5;
- intensity = 150; /// strength of the light
- class Attenuation
- {
- start = 0;
- constant = 0;
- linear = 0;
- quadratic = 0.25;
- hardLimitStart = 25; /// it is good to have some limit otherwise the light would shine to infinite distance
- hardLimitEnd = 150; /// this allows adding more lights into scene
- };
- };
- class PP2: LightCarHeadR01
- {
- position = "PP2";
- direction = "PP2_end";
- FlareSize = 1.5;
- intensity = 150; /// strength of the light
- class Attenuation
- {
- start = 0;
- constant = 0;
- linear = 0;
- quadratic = 0.25;
- hardLimitStart = 25; /// it is good to have some limit otherwise the light would shine to infinite distance
- hardLimitEnd = 150; /// this allows adding more lights into scene
- };
- };
- class gyro1
- {
- color[] = {0, 0, 2500};
- ambient[] = {5, 5, 5};
- intensity = 1;
- size = 0.5; /// size of the light point seen from distance
- innerAngle = 50; /// angle of full light
- outerAngle = 100; /// angle of some light
- coneFadeCoef = 4; /// attenuation of light between the above angles
- position = "gyropos1"; /// memory point for start of the light and flare
- direction = "gyrodir1"; /// memory point for the light direction
- hitpoint = "Light_R"; /// point(s) in hitpoint lod for the light (hitPoints are created by engine)
- selection = "gyro1"; /// selection for artificial glow around the bulb, not much used any more
- useFlare = true;
- flareSize = 1.0;
- flareMaxDistance = 100;
- activeLight = false; /// engine counts this one as an active light into limit of lights
- dayLight = false; /// it doesn't shine during the day
- drawLight = false;
- class Attenuation
- {
- start = 0;
- constant = 0;
- linear = 0;
- quadratic = 0.3;
- hardLimitStart = 25;
- hardLimitEnd = 35;
- };
- };
- class gyro2: gyro1
- {
- direction = "gyrodir2";
- };
- class gyro3: gyro1
- {
- direction = "gyrodir3";
- };
- class gyro4: gyro1
- {
- direction = "gyrodir4";
- };
- };
- aggregateReflectors[] = {{"gyro1"},{"gyro2"},{"gyro3"},{"gyro4"},{"PP1"},{"PP2"},{"LightCarHeadL01", "LightCarHeadL02"}, {"LightCarHeadR01", "LightCarHeadR02"}}; /// aggregating reflectors helps the engine a lot
- /// it might be even good to aggregate all lights into one source as it is done for most of the cars
- // Must be kept as fail-safe in case of issue with the function
- // Definition of texture sources (skins), used for the VhC (Vehicle customization)
- // Also, because the Garage uses the VhC, it will make them available from the garage
- // [_textureSourceClass1, _probability1, _textureSourceClass2, _probability2, ...]
- // Default behavior of the VhC is to select one of these sources, with a weighted random
- class MFD /// Clocks on the car board
- {
- class ClockHUD
- {
- #include "cfgHUD.hpp"
- };
- };
- class UserActions
- {
- class gyropharef
- {
- displayName = "<t color='#0000ff'>Gyrophares ON</t>";
- position = "drivewheel";
- radius = 2;
- onlyForPlayer = 0;
- condition = "player IN this && this animationPhase ""lamp1"" <= 0.5";
- statement = "this animate [""lamp1"",1];this animate [""btgyr"",1]";
- };
- class gyrophare
- {
- displayName = "<t color='#0000ff'>Gyrophares OFF</t>";
- position = "drivewheel";
- radius = 2;
- onlyForPlayer = 0;
- condition = "player IN this && this animationPhase ""lamp1"" > 0.5";
- statement = "this animate [""lamp1"",0];this animate [""btgyr"",0]";
- };
- class ClignotantsGaucheAllumer
- {
- displayName="<t color='#fff000'>Signal Lef ON(A)</t>";
- displayNameDefault="<t color='#fff000'>Allumer les clignotants gauches</t>";
- priority=3;
- radius=20;
- position="drivewheel";
- showWindow=0;
- onlyForPlayer=1;
- shortcut="LeanLeft";
- condition="(driver this == player) && (alive this) && (this animationPhase ""ClignotantsGaucheStart"" == 0) && isEngineOn this";
- statement="vehicle player animate [""ClignotantsGaucheStart"", 1];";
- };
- class ClignotantsGaucheEteindre
- {
- displayName="<t color='#fff000'>Signal left OFF(A)</t>";
- displayNameDefault="<t color='#fff000'>Eteindre les clignotants gauches</t>";
- priority=3;
- radius=20;
- position="drivewheel";
- showWindow=0;
- onlyForPlayer=1;
- shortcut="LeanLeft";
- condition="(driver this == player) && (alive this) && (this animationPhase ""ClignotantsGaucheStart"" != 0)";
- statement="vehicle player animate [""ClignotantsGaucheStart"", 0];";
- };
- class ClignotantsDroitAllumer
- {
- displayName="<t color='#fff000'>Signal right ON (E)</t>";
- displayNameDefault="<t color='#fff000'>Allumer les clignotants droits</t>";
- priority=3;
- radius=20;
- position="drivewheel";
- showWindow=0;
- onlyForPlayer=1;
- shortcut="LeanRight";
- condition="(driver this == player) && (alive this) && (this animationPhase ""ClignotantsDroitStart"" == 0) && isEngineOn this";
- statement="vehicle player animate [""ClignotantsDroitStart"", 1];";
- };
- class ClignotantsDroitEteindre
- {
- displayName="<t color='#fff000'>Signal right OFF (E)</t>";
- displayNameDefault="<t color='#fff000'>Eteindre les clignotants droits</t>";
- priority=3;
- radius=20;
- position="drivewheel";
- showWindow=0;
- onlyForPlayer=1;
- shortcut="LeanRight";
- condition="(driver this == player) && (alive this) && (this animationPhase ""ClignotantsDroitStart"" != 0)";
- statement="vehicle player animate [""ClignotantsDroitStart"", 0];";
- };
- };
- };
- class chdefender_vlhr : chdefender_base {
- scope = public;
- crew = "C_man_1";
- side = 2;
- faction = "chmods";
- displayName = "Land Rover Defender VLHR";
- author = "Charlieco89";
- hiddenSelectionsTextures[] = {"Charlieco89_Defender\cars\data\textures\bodyvlhr.paa","#(argb,8,8,3)color(0.952941,0.952941,0.952941,1.0,co)"};
- class EventHandlers {init = "_this execVM ""Charlieco89_Defender\cars\data\scripts\init_vlhr.sqf"";";};
- editorSubcategory = "chSP";
- vehicleClass = "chSP";
- weapons[]=
- {
- "chkla4","chvlhrs"
- };
- class UserActions: UserActions
- {
- class Siren_on {
- displayName = "<t color='#ff0000'>Sirène ON</t>";
- position = "drivewheel";
- radius = 2;
- condition = "player IN this && (this getVariable ['siren',0]) == 0";
- statement = "this setVariable ['siren',1,true] && this animate [""btsiren"",1]";
- onlyForplayer = 0;
- };
- class Siren_off {
- displayName = "<t color='#ff0000'>Sirène OFF</t>";
- position = "drivewheel";
- radius = 2;
- condition = "player IN this && (this getVariable ['siren',0]) == 1";
- statement = "this setVariable ['siren',0,true] && this animate [""btsiren"",0]";
- onlyForplayer = 0;
- };
- };
- };
- class chdefender_pn : chdefender_base {
- scope = public;
- crew = "C_man_1";
- side = 1;
- faction = "chmods";
- displayName = "Land Rover Defender Police Nationale";
- author = "Charlieco89";
- hiddenSelectionsTextures[] = {"Charlieco89_Defender\cars\data\textures\bodypn.paa","#(argb,8,8,3)color(0.952941,0.952941,0.952941,1.0,co)"};
- class EventHandlers {init = "_this execVM ""Charlieco89_Defender\cars\data\scripts\init_pn.sqf"";";};
- editorSubcategory = "chPN";
- vehicleClass = "chPN";
- weapons[]=
- {
- "chkla4","chpns"
- };
- class UserActions: UserActions
- {
- class Siren_on {
- displayName = "<t color='#ff0000'>Sirène ON</t>";
- position = "drivewheel";
- radius = 2;
- condition = "player IN this && (this getVariable ['siren',0]) == 0";
- statement = "this setVariable ['siren',1,true] && this animate [""btsiren"",1]";
- onlyForplayer = 0;
- };
- class Siren_off {
- displayName = "<t color='#ff0000'>Sirène OFF</t>";
- position = "drivewheel";
- radius = 2;
- condition = "player IN this && (this getVariable ['siren',0]) == 1";
- statement = "this setVariable ['siren',0,true] && this animate [""btsiren"",0]";
- onlyForplayer = 0;
- };
- };
- };
- class chdefender_gn : chdefender_base {
- scope = public;
- crew = "C_man_1";
- side = 1;
- faction = "chmods";
- displayName = "Land Rover Defender Gendarmerie";
- author = "Charlieco89";
- hiddenSelectionsTextures[] = {"Charlieco89_Defender\cars\data\textures\bodygn.paa","#(argb,8,8,3)color(0.952941,0.952941,0.952941,1.0,co)"};
- class EventHandlers {init = "_this execVM ""Charlieco89_Defender\cars\data\scripts\init_gn.sqf"";";};
- editorSubcategory = "chGN";
- vehicleClass = "chGN";
- weapons[]=
- {
- "chkla4","chgns"
- };
- class UserActions: UserActions
- {
- class Siren_on {
- displayName = "<t color='#ff0000'>Sirène ON</t>";
- position = "drivewheel";
- radius = 2;
- condition = "player IN this && (this getVariable ['siren',0]) == 0";
- statement = "this setVariable ['siren',1,true] && this animate [""btsiren"",1]";
- onlyForplayer = 0;
- };
- class Siren_off {
- displayName = "<t color='#ff0000'>Sirène OFF</t>";
- position = "drivewheel";
- radius = 2;
- condition = "player IN this && (this getVariable ['siren',0]) == 1";
- statement = "this setVariable ['siren',0,true] && this animate [""btsiren"",0]";
- onlyForplayer = 0;
- };
- };
- };
- class chdefender_vsavhr : chdefender_base {
- model = "\Charlieco89_Defender\defender_vsav_m"; /// simple path to model
- scope = public;
- crew = "C_man_1";
- side = 2;
- faction = "chmods";
- displayName = "Land Rover Defender VSAVHR";
- author = "Charlieco89";
- hiddenSelectionsTextures[] = {"Charlieco89_Defender\cars\data\textures\cabine.paa","#(argb,8,8,3)color(0.47451,0,0,1.0,co)","Charlieco89_Defender\cars\data\textures\cellule.paa"};
- class EventHandlers {init = "_this execVM ""Charlieco89_Defender\cars\data\scripts\init_vl.sqf"";";};
- editorSubcategory = "chSP";
- vehicleClass = "chSP";
- weapons[]=
- {
- "chkla4","chvls"
- };
- class AnimationSources
- {
- class Doors {
- source = "user";
- animPeriod = 2;
- initPhase = 0;
- };
- class HitLFWheel
- {
- source = "Hit";
- hitpoint = "HitLFWheel";
- raw = 1;
- };
- class HitLBWheel
- {
- source = "Hit";
- hitpoint = "HitLBWheel";
- raw = 1;
- };
- class HitRFWheel
- {
- source = "Hit";
- hitpoint = "HitRFWheel";
- raw = 1;
- };
- class HitRBWheel
- {
- source = "Hit";
- hitpoint = "HitRBWheel";
- raw = 1;
- };
- };
- transportSoldier = 1; /// number of cargo except driver
- cargoAction[]=
- {
- "passenger_low01"
- };
- class Reflectors /// only front lights are considered to be reflectors to save CPU
- {
- class LightCarHeadL01 /// lights on each side consist of two bulbs with different flares
- {
- color[] = {1900, 1800, 1700}; /// approximate colour of standard lights
- ambient[] = {5, 5, 5}; /// nearly a white one
- position = "LightCarHeadL01"; /// memory point for start of the light and flare
- direction = "LightCarHeadL01_end"; /// memory point for the light direction
- hitpoint = "Light_L"; /// point(s) in hitpoint lod for the light (hitPoints are created by engine)
- selection = "Light_L"; /// selection for artificial glow around the bulb, not much used any more
- size = 1; /// size of the light point seen from distance
- innerAngle = 100; /// angle of full light
- outerAngle = 179; /// angle of some light
- coneFadeCoef = 10; /// attenuation of light between the above angles
- intensity = 1; /// strength of the light
- useFlare = true; /// does the light use flare?
- dayLight = false; /// switching light off during day saves CPU a lot
- flareSize = 1.0; /// how big is the flare
- class Attenuation
- {
- start = 1.0;
- constant = 0;
- linear = 0;
- quadratic = 0.25;
- hardLimitStart = 30; /// it is good to have some limit otherwise the light would shine to infinite distance
- hardLimitEnd = 60; /// this allows adding more lights into scene
- };
- };
- class LightCarHeadL02: LightCarHeadL01
- {
- position = "LightCarHeadL02";
- direction = "LightCarHeadL02_end";
- FlareSize = 0.5; /// side bulbs aren't that strong
- };
- class LightCarHeadR01: LightCarHeadL01
- {
- position = "LightCarHeadR01";
- direction = "LightCarHeadR01_end";
- hitpoint = "Light_R";
- selection = "Light_R";
- };
- class LightCarHeadR02: LightCarHeadR01
- {
- position = "LightCarHeadR02";
- direction = "LightCarHeadR02_end";
- FlareSize = 0.5;
- };
- class PP1: LightCarHeadR01
- {
- position = "PP1";
- direction = "PP1_end";
- FlareSize = 1.5;
- intensity = 150; /// strength of the light
- class Attenuation
- {
- start = 0;
- constant = 0;
- linear = 0;
- quadratic = 0.25;
- hardLimitStart = 25; /// it is good to have some limit otherwise the light would shine to infinite distance
- hardLimitEnd = 150; /// this allows adding more lights into scene
- };
- };
- class PP2: LightCarHeadR01
- {
- position = "PP2";
- direction = "PP2_end";
- FlareSize = 1.5;
- intensity = 150; /// strength of the light
- class Attenuation
- {
- start = 0;
- constant = 0;
- linear = 0;
- quadratic = 0.25;
- hardLimitStart = 25; /// it is good to have some limit otherwise the light would shine to infinite distance
- hardLimitEnd = 150; /// this allows adding more lights into scene
- };
- };
- class gyro1
- {
- color[] = {0, 0, 2500};
- ambient[] = {5, 5, 5};
- intensity = 1;
- size = 0.5; /// size of the light point seen from distance
- innerAngle = 50; /// angle of full light
- outerAngle = 100; /// angle of some light
- coneFadeCoef = 4; /// attenuation of light between the above angles
- position = "gyropos1"; /// memory point for start of the light and flare
- direction = "gyrodir1"; /// memory point for the light direction
- hitpoint = "Light_R"; /// point(s) in hitpoint lod for the light (hitPoints are created by engine)
- selection = "gyro1"; /// selection for artificial glow around the bulb, not much used any more
- useFlare = true;
- flareSize = 1.0;
- flareMaxDistance = 100;
- activeLight = false; /// engine counts this one as an active light into limit of lights
- dayLight = false; /// it doesn't shine during the day
- drawLight = false;
- class Attenuation
- {
- start = 0;
- constant = 0;
- linear = 0;
- quadratic = 0.3;
- hardLimitStart = 25;
- hardLimitEnd = 35;
- };
- };
- class gyro2: gyro1
- {
- direction = "gyrodir2";
- };
- class gyro3: gyro1
- {
- direction = "gyrodir3";
- };
- class gyro4: gyro1
- {
- direction = "gyrodir4";
- };
- class gyro5: gyro1
- {
- position = "gyropos2";
- direction = "gyrodir5";
- };
- class gyro6: gyro1
- {
- position = "gyropos2";
- direction = "gyrodir6";
- };
- class gyro7: gyro1
- {
- position = "gyropos2";
- direction = "gyrodir7";
- };
- class gyro8: gyro1
- {
- position = "gyropos2";
- direction = "gyrodir8";
- };
- class gyro9: gyro1
- {
- position = "gyropos3";
- direction = "gyrodir9";
- };
- class gyro10: gyro1
- {
- position = "gyropos4";
- direction = "gyrodir10";
- };
- class gyro11: gyro1
- {
- position = "gyropos5";
- direction = "gyrodir11";
- };
- class gyro12: gyro1
- {
- position = "gyropos6";
- direction = "gyrodir12";
- };
- class gyro13: gyro1
- {
- position = "gyropos7";
- direction = "gyrodir13";
- };
- class gyro14: gyro1
- {
- position = "gyropos8";
- direction = "gyrodir14";
- };
- class gyro15: gyro1
- {
- position = "gyropos9";
- direction = "gyrodir15";
- };
- class gyro16: gyro1
- {
- position = "gyropos10";
- direction = "gyrodir16";
- };
- class gyro17: gyro1
- {
- position = "gyropos11";
- direction = "gyrodir17";
- };
- class gyro18: gyro1
- {
- position = "gyropos12";
- direction = "gyrodir18";
- };
- };
- aggregateReflectors[] = {{"PP1"},{"PP2"},{"LightCarHeadL01", "LightCarHeadL02"}, {"LightCarHeadR01", "LightCarHeadR02"}}; /// aggregating reflectors helps the engine a lot
- /// it might be even good to aggregate all lights into one source as it is done for most of the cars
- class UserActions
- {
- class UserActions
- {
- class gyropharef
- {
- displayName = "<t color='#0094ff'>Siren ON</t>";
- position = "drivewheel";
- radius = 2;
- onlyForPlayer = 0;
- condition = "player IN this && this animationPhase ""lamp1"" <= 0.5";
- statement = "this animate [""lamp1"",1];this animate [""btgyr"",1],this animate [""lamp2"",1]";
- };
- class gyrophare
- {
- displayName = "<t color='#0094ff'>Siren OFF</t>";
- position = "drivewheel";
- radius = 2;
- onlyForPlayer = 0;
- condition = "player IN this && this animationPhase ""lamp1"" > 0.5";
- statement = "this animate [""lamp1"",0];this animate [""btgyr"",0],this animate [""lamp2"",0]";
- };
- class ClignotantsGaucheAllumer
- {
- displayName="<t color='#fff000'>Signal left ON (A)</t>";
- displayNameDefault="<t color='#fff000'>Allumer les clignotants gauches</t>";
- priority=3;
- radius=20;
- position="drivewheel";
- showWindow=0;
- onlyForPlayer=1;
- shortcut="LeanLeft";
- condition="(driver this == player) && (alive this) && (this animationPhase ""ClignotantsGaucheStart"" == 0) && isEngineOn this";
- statement="vehicle player animate [""ClignotantsGaucheStart"", 1];";
- };
- class ClignotantsGaucheEteindre
- {
- displayName="<t color='#fff000'>Signal left OFF (A)</t>";
- displayNameDefault="<t color='#fff000'>Eteindre les clignotants gauches</t>";
- priority=3;
- radius=20;
- position="drivewheel";
- showWindow=0;
- onlyForPlayer=1;
- shortcut="LeanLeft";
- condition="(driver this == player) && (alive this) && (this animationPhase ""ClignotantsGaucheStart"" != 0)";
- statement="vehicle player animate [""ClignotantsGaucheStart"", 0];";
- };
- class ClignotantsDroitAllumer
- {
- displayName="<t color='#fff000'>Signal right ON (E)</t>";
- displayNameDefault="<t color='#fff000'>Allumer les clignotants droits</t>";
- priority=3;
- radius=20;
- position="drivewheel";
- showWindow=0;
- onlyForPlayer=1;
- shortcut="LeanRight";
- condition="(driver this == player) && (alive this) && (this animationPhase ""ClignotantsDroitStart"" == 0) && isEngineOn this";
- statement="vehicle player animate [""ClignotantsDroitStart"", 1];";
- };
- class ClignotantsDroitEteindre
- {
- displayName="<t color='#fff000'>Signal rights ON(E)</t>";
- displayNameDefault="<t color='#fff000'>Eteindre les clignotants droits</t>";
- priority=3;
- radius=20;
- position="drivewheel";
- showWindow=0;
- onlyForPlayer=1;
- shortcut="LeanRight";
- condition="(driver this == player) && (alive this) && (this animationPhase ""ClignotantsDroitStart"" != 0)";
- statement="vehicle player animate [""ClignotantsDroitStart"", 0];";
- };
- class Close_Doors {
- displayName = "Close doors";
- radius = 15;
- position = "drivercontrols";
- onlyforplayer = 0;
- condition = "player IN this && this animationPhase ""Porte1"" > 0.5";
- statement = "this animate [""Porte1"",0];this animate [""Porte2"", 0]";
- };
- class Open_Doors {
- displayName = "Open doors";
- radius = 15;
- position = "drivercontrols";
- onlyforplayer = 0;
- condition = "player IN this && this animationPhase ""Porte1"" < 0.5 && speed this < 10;";
- statement = "this animate [""Porte1"",1];this animate [""Porte2"", 1]";
- };
- };
- };
- class chdefender_grimp : chdefender_base {
- model = "\Charlieco89_Defender\defender_grimp_m";
- scope = public;
- crew = "C_man_1";
- side = 2;
- faction = "chmods";
- displayName = "Land Rover Defender GRIMP";
- author = "Charlieco89";
- hiddenSelectionsTextures[] = {"Charlieco89_Defender\cars\data\textures\bodygrimp.paa","#(argb,8,8,3)color(0.952941,0.952941,0.952941,1.0,co)"};
- class EventHandlers {init = "_this execVM ""Charlieco89_Defender\cars\data\scripts\init_vl.sqf"";";};
- editorSubcategory = "chSP";
- vehicleClass = "chSP";
- weapons[]=
- {
- "chkla4","chvls"
- };
- class Reflectors /// only front lights are considered to be reflectors to save CPU
- {
- class LightCarHeadL01 /// lights on each side consist of two bulbs with different flares
- {
- color[] = {1900, 1800, 1700}; /// approximate colour of standard lights
- ambient[] = {5, 5, 5}; /// nearly a white one
- position = "LightCarHeadL01"; /// memory point for start of the light and flare
- direction = "LightCarHeadL01_end"; /// memory point for the light direction
- hitpoint = "Light_L"; /// point(s) in hitpoint lod for the light (hitPoints are created by engine)
- selection = "Light_L"; /// selection for artificial glow around the bulb, not much used any more
- size = 1; /// size of the light point seen from distance
- innerAngle = 100; /// angle of full light
- outerAngle = 179; /// angle of some light
- coneFadeCoef = 10; /// attenuation of light between the above angles
- intensity = 1; /// strength of the light
- useFlare = true; /// does the light use flare?
- dayLight = false; /// switching light off during day saves CPU a lot
- flareSize = 1.0; /// how big is the flare
- class Attenuation
- {
- start = 1.0;
- constant = 0;
- linear = 0;
- quadratic = 0.25;
- hardLimitStart = 30; /// it is good to have some limit otherwise the light would shine to infinite distance
- hardLimitEnd = 60; /// this allows adding more lights into scene
- };
- };
- class LightCarHeadL02: LightCarHeadL01
- {
- position = "LightCarHeadL02";
- direction = "LightCarHeadL02_end";
- FlareSize = 0.5; /// side bulbs aren't that strong
- };
- class LightCarHeadR01: LightCarHeadL01
- {
- position = "LightCarHeadR01";
- direction = "LightCarHeadR01_end";
- hitpoint = "Light_R";
- selection = "Light_R";
- };
- class LightCarHeadR02: LightCarHeadR01
- {
- position = "LightCarHeadR02";
- direction = "LightCarHeadR02_end";
- FlareSize = 0.5;
- };
- class PP1: LightCarHeadR01
- {
- position = "PP1";
- direction = "PP1_end";
- FlareSize = 1.5;
- intensity = 150; /// strength of the light
- class Attenuation
- {
- start = 0;
- constant = 0;
- linear = 0;
- quadratic = 0.25;
- hardLimitStart = 25; /// it is good to have some limit otherwise the light would shine to infinite distance
- hardLimitEnd = 150; /// this allows adding more lights into scene
- };
- };
- class PP2: LightCarHeadR01
- {
- position = "PP2";
- direction = "PP2_end";
- FlareSize = 1.5;
- intensity = 150; /// strength of the light
- class Attenuation
- {
- start = 0;
- constant = 0;
- linear = 0;
- quadratic = 0.25;
- hardLimitStart = 25; /// it is good to have some limit otherwise the light would shine to infinite distance
- hardLimitEnd = 150; /// this allows adding more lights into scene
- };
- };
- class gyro1
- {
- color[] = {0, 0, 2500};
- ambient[] = {5, 5, 5};
- intensity = 1;
- size = 0.5; /// size of the light point seen from distance
- innerAngle = 50; /// angle of full light
- outerAngle = 100; /// angle of some light
- coneFadeCoef = 4; /// attenuation of light between the above angles
- position = "gyropos1"; /// memory point for start of the light and flare
- direction = "gyrodir1"; /// memory point for the light direction
- hitpoint = "Light_R"; /// point(s) in hitpoint lod for the light (hitPoints are created by engine)
- selection = "gyro1"; /// selection for artificial glow around the bulb, not much used any more
- useFlare = true;
- flareSize = 1.0;
- flareMaxDistance = 100;
- activeLight = false; /// engine counts this one as an active light into limit of lights
- dayLight = false; /// it doesn't shine during the day
- drawLight = false;
- class Attenuation
- {
- start = 0;
- constant = 0;
- linear = 0;
- quadratic = 0.3;
- hardLimitStart = 25;
- hardLimitEnd = 35;
- };
- };
- class gyro2: gyro1
- {
- direction = "gyrodir2";
- };
- class gyro3: gyro1
- {
- direction = "gyrodir3";
- };
- class gyro4: gyro1
- {
- direction = "gyrodir4";
- };
- class gyro5: gyro1
- {
- position = "gyropos2";
- direction = "gyrodir5";
- };
- class gyro6: gyro1
- {
- position = "gyropos2";
- direction = "gyrodir6";
- };
- class gyro7: gyro1
- {
- position = "gyropos2";
- direction = "gyrodir7";
- };
- class gyro8: gyro1
- {
- position = "gyropos2";
- direction = "gyrodir8";
- };
- };
- aggregateReflectors[] = {{"PP1"},{"PP2"},{"LightCarHeadL01", "LightCarHeadL02"}, {"LightCarHeadR01", "LightCarHeadR02"}}; /// aggregating reflectors helps the engine a lot
- /// it might be even good to aggregate all lights into one source as it is done for most of the cars
- class UserActions
- {
- class gyropharef
- {
- displayName = "<t color='#0000ff'>Gyrophares ON</t>";
- position = "drivewheel";
- radius = 2;
- onlyForPlayer = 0;
- condition = "player IN this && this animationPhase ""lamp1"" <= 0.5";
- statement = "this animate [""lamp1"",1];this animate [""btgyr"",1],this animate [""lamp2"",1]";
- };
- class gyrophare
- {
- displayName = "<t color='#0000ff'>Gyrophares OFF</t>";
- position = "drivewheel";
- radius = 2;
- onlyForPlayer = 0;
- condition = "player IN this && this animationPhase ""lamp1"" > 0.5";
- statement = "this animate [""lamp1"",0];this animate [""btgyr"",0],this animate [""lamp2"",0]";
- };
- class ClignotantsGaucheAllumer
- {
- displayName="<t color='#fff000'>Allumer les clignotants gauches (A)</t>";
- displayNameDefault="<t color='#fff000'>Allumer les clignotants gauches</t>";
- priority=3;
- radius=20;
- position="drivewheel";
- showWindow=0;
- onlyForPlayer=1;
- shortcut="LeanLeft";
- condition="(driver this == player) && (alive this) && (this animationPhase ""ClignotantsGaucheStart"" == 0) && isEngineOn this";
- statement="vehicle player animate [""ClignotantsGaucheStart"", 1];";
- };
- class ClignotantsGaucheEteindre
- {
- displayName="<t color='#fff000'>Eteindre les clignotants gauches (A)</t>";
- displayNameDefault="<t color='#fff000'>Eteindre les clignotants gauches</t>";
- priority=3;
- radius=20;
- position="drivewheel";
- showWindow=0;
- onlyForPlayer=1;
- shortcut="LeanLeft";
- condition="(driver this == player) && (alive this) && (this animationPhase ""ClignotantsGaucheStart"" != 0)";
- statement="vehicle player animate [""ClignotantsGaucheStart"", 0];";
- };
- class ClignotantsDroitAllumer
- {
- displayName="<t color='#fff000'>Allumer les clignotants droits (E)</t>";
- displayNameDefault="<t color='#fff000'>Allumer les clignotants droits</t>";
- priority=3;
- radius=20;
- position="drivewheel";
- showWindow=0;
- onlyForPlayer=1;
- shortcut="LeanRight";
- condition="(driver this == player) && (alive this) && (this animationPhase ""ClignotantsDroitStart"" == 0) && isEngineOn this";
- statement="vehicle player animate [""ClignotantsDroitStart"", 1];";
- };
- class ClignotantsDroitEteindre
- {
- displayName="<t color='#fff000'>Eteindre les clignotants droits (E)</t>";
- displayNameDefault="<t color='#fff000'>Eteindre les clignotants droits</t>";
- priority=3;
- radius=20;
- position="drivewheel";
- showWindow=0;
- onlyForPlayer=1;
- shortcut="LeanRight";
- condition="(driver this == player) && (alive this) && (this animationPhase ""ClignotantsDroitStart"" != 0)";
- statement="vehicle player animate [""ClignotantsDroitStart"", 0];";
- };
- class Siren_on {
- displayName = "<t color='#ff0000'>Sirène ON</t>";
- position = "drivewheel";
- radius = 2;
- condition = "player IN this && (this getVariable ['siren',0]) == 0";
- statement = "this setVariable ['siren',1,true] && this animate [""btsiren"",1]";
- onlyForplayer = 0;
- };
- class Siren_off {
- displayName = "<t color='#ff0000'>Sirène OFF</t>";
- position = "drivewheel";
- radius = 2;
- condition = "player IN this && (this getVariable ['siren',0]) == 1";
- statement = "this setVariable ['siren',0,true] && this animate [""btsiren"",0]";
- onlyForplayer = 0;
- };
- class PPf
- {
- displayName = "<t color='#0094ff'>Feux de route</t>";
- position = "drivewheel";
- radius = 2;
- onlyForPlayer = 0;
- condition = "player IN this && this animationPhase ""PP"" <= 0.5";
- statement = "this animate [""PP"",1]";
- };
- class PP
- {
- displayName = "<t color='#2d9900'>Feux de croisement</t>";
- position = "drivewheel";
- radius = 2;
- onlyForPlayer = 0;
- condition = "player IN this && this animationPhase ""PP"" > 0.5";
- statement = "this animate [""PP"",0]";
- };
- };
- };
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement