LBpilot1 0 Posted January 6, 2008 *This is for my own personal use* FLIR on and off are suppose to show up in the action list of the cobra gunner but they are not. Config.cpp <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">#define true 1 #define false 0 #define VSoft 0 #define VArmor 1 #define VAir 2 #define private 0 #define protected 1 #define public 2 #define TEast 0 #define TWest 1 #define TGuerrila 2 #define TCivilian 3 #define TSideUnknown 4 #define TEnemy 5 #define TFriendly 6 #define TLogic 7 #define ReadAndWrite 0 #define ReadAndCreate 1 #define ReadOnly 2 #define ReadOnlyVerified 3 class Air; class Helicopter; class Turrets; class Mainturret; class AnimationSources; class CfgPatches { class Cobra_FLIR { units[] = {}; weapons[] = {}; requiredVersion = 0.1; requiredAddons[] = {"CAAir"}; }; }; class CfgVehicles { class AH1W; class Cobra_FLIR : AH1W { selectionHRotorStill = "mainRotorStatic"; selectionHRotorMove = "mainRotorBlurred"; selectionVRotorStill = "tailRotorStatic"; selectionVRotorMove = "tailRotorBlurred"; memoryPointLMissile = "Missile_1"; memoryPointRMissile = "Missile_2"; memoryPointLRocket = "Rocket_1"; memoryPointRRocket = "Rocket_2"; selectionFireAnim = "muzzleflash"; crew = "SoldierWPilot"; scope = 2; side = 1; displayName = "Cobra FLIR"; nameSound = "cobra"; accuracy = 0.03; driverAction = "AH1Z_Pilot"; crewVulnerable = 0; maxSpeed = 270; typicalCargo[] = {"SoldierWPilot", "SoldierWPilot"}; soundGetIn[] = {"\ca\air\Data\Sound\heli_door1", 0.1, 1}; soundGetOut[] = {"\ca\air\Data\Sound\heli_door1", 0.1, 1}; soundEngine[] = {"\ca\air\Data\Sound\AH1_engine_v3a", 39.8107, 1}; armor = 60; damageResistance = 0.00593; cost = 10000000; model = "\ca\air\ah1z"; picture = "\ca\air\data\ico\ah1z_CA.paa"; mapSize = 13; Icon = "\ca\air\data\map_ico\icomap_ah1z_CA.paa"; memoryPointsGetInDriver = "pos_driver"; memoryPointsGetInDriverDir = "pos_driver_dir"; class Turrets : Turrets { class MainTurret : MainTurret { gunnerAction = "UH60_Pilot"; gunnerInAction = "UH60_Pilot"; outGunnerMayFire = 1; commanding = -1; primary = 1; weapons[] = {M197, "FFARLauncher", "HellfireLauncher"}; magazines[] = {"750Rnd_M197_AH1", "38Rnd_FFAR", "8Rnd_Hellfire"}; memoryPointsGetInGunner = "pos_gunner"; memoryPointsGetInGunnerDir = "pos_gunner_dir"; memoryPointGun = "machinegun"; minElev = -60; maxElev = 10; initElev = 0; minTurn = -70; maxTurn = 70; initTurn = 0; gunnerOpticsColor[] = {1,1,1,1}; gunnerOpticsModel = "\ca\air\optika_AH1Z"; gunnerForceOptics = 0; }; }; threat[] = {0.3, 1, 0.8}; class AnimationSources : AnimationSources { class 20mmBarrels { source = "reload"; weapon = M197; }; }; laserScanner = 1; class Library { libTextDesc = $STR_LIB_AH1Z; }; dammageHalf[] = {"\ca\air\data\ah1z_glass_ca.paa", "\ca\air\data\ah1z_glassbr1_ca.paa", "\ca\air\data\ah1z_glass_ca.paa", "\ca\air\data\ah1z_glassbr1_ca.paa"}; dammageFull[] = {"\ca\air\data\ah1z_glass_ca.paa", "\ca\air\data\ah1z_glassbr2_ca.paa", "\ca\air\data\ah1z_glass_ca.paa", "\ca\air\data\ah1z_glassbr2_ca.paa", "\Ca\air\data\ah1z_monitor_glass_ca.paa", "\Ca\air\data\ah1z_monitor_glass_destr_co.paa"}; class Damage { tex[] = {}; mat[] = {"ca\air\data\ah1z_body.rvmat", "ca\air\data\ah1z_body.rvmat", "ca\air\data\ah1z_body_destruct.rvmat", "ca\air\data\ah1z_cockpit.rvmat", "ca\air\data\ah1z_cockpit.rvmat", "ca\air\data\ah1z_cockpit_destruct.rvmat", "ca\air\data\ah1z_engines.rvmat", "ca\air\data\ah1z_engines.rvmat", "ca\air\data\ah1z_engines_destruct.rvmat", "Ca\air\data\ah1z_monitors.rvmat", "Ca\air\data\ah1z_monitors.rvmat", "Ca\air\data\ah1z_monitors_destruct.rvmat"}; class Eventhandlers { Init = " _this exec ""\Cobra_FLIR\Data\Scripts\ah64_flir_init.sqs""; "; getin = " _this exec ""\Cobra_FLIR\Data\Scripts\ah64_flir_init.sqs""; "; }; }; class RscObject; class RscTitles { class MAP_AH64_FLIR_Optics { idd = -1; movingEnable = 0; duration = 1000; name = "MAP_AH64_FLIR_Optics"; class objects { class MAP_AH64_FLIR_Optics : RscObject { model = "\Cobra_FLIR\optika_ah64_2.p3d"; idc = -1; position[] = {0.00025,0.00039,0.0675}; direction[] = {"sin 0","sin 180 * cos 0","cos 180 * cos 0"}; up[] = {0,"cos 180","-sin 180"}; }; class MAP_RSC_EMPTY { idd = -1; movingEnable = 0; duration = 0.1; name = "MAP_RSC_EMPTY"; class objects { class MAP_RSC_EMPTY : RscObject { model = "\Cobra_FLIR\map_rsc_empty.p3d"; idc = -1; position[] = {0,0,0.0675}; direction[] = {"sin 0","sin 180 * cos 0","cos 180 * cos 0"}; up[] = {0,"cos 180","-sin 180"}; }; }; }; }; Data\Scripts: map_flirOn.sqs <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">MAP_FLIROn = true; Cobra_FLIR = _this select 0; _m = 0; _a = 0; _monat = date select 1; ? _monat == 1 : _m = 7; _a = 17; ? _monat == 2 : _m = 7; _a = 17.75; ? _monat == 3 : _m = 6; _a = 18; ? _monat == 4 : _m = 5.75; _a = 18.75; ? _monat == 5 : _m = 5.25; _a = 19; ? _monat == 6 : _m = 5; _a = 20.5; ? _monat == 7 : _m = 4.25; _a = 20.5; ? _monat == 8 : _m = 4.5; _a = 20; ? _monat == 9 : _m = 5; _a = 19.75; ? _monat == 10 : _m = 5.5; _a = 19; ? _monat == 11 : _m = 6; _a = 18; ? _monat == 12 : _m = 6.5; _a = 17.5; if((daytime <_m)||(daytime >_a))then{goto "nacht"}else{goto "tag"}; #nacht Cobra_FLIR switchCamera "Gunner"; cutRsc ["MAP_AH64_FLIR_Optics","PLAIN"]; setAperture 0.03; #nacht2 ?(daytime >_m)&&(daytime <_a): goto "tag"; ?(!(alive PLAYER)): goto "ende"; ?(!(gunner Cobra_FLIR == Player)): goto "ende"; ?(!(MAP_FLIROn)): goto "ende"; Cobra_FLIR switchCamera "Gunner"; ~0.2 goto "nacht2"; #tag Cobra_FLIR switchCamera "Gunner"; cutRsc ["MAP_RSC_EMPTY","PLAIN"]; setAperture -1; #tag2 ?(daytime <_m)||(daytime >_a): goto "nacht"; ?(!(alive PLAYER)): goto "ende"; ?(!(gunner Cobra_FLIR == Player)): goto "ende"; ?(!(MAP_FLIROn)): goto "ende"; Cobra_FLIR switchCamera "Gunner"; ~0.2 goto "tag2"; #ende Player removeAction MAP_FlirViewOn; Player removeAction MAP_FlirViewOff; setAperture -1; cutRsc ["MAP_RSC_EMPTY","PLAIN"]; exit; map_flirOff.sqs <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">Cobra_FLIR = _this select 0; setAperture -1; MAP_FLIROn = false; Cobra_FLIR switchCamera "INTERNAL"; cutRsc ["MAP_RSC_EMPTY","PLAIN"]; exit; ah64_flir_init.sqs <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> Cobra_FLIR = _this select 0; _Gunner = gunner Cobra_FLIR; ?(!(_Gunner == PLAYER)): exit; MAP_FLIROn = False; _flirOn = false; _flirOff = false; #CheckFlir Cobra_FLIR removeAction MAP_FlirViewOn; Cobra_FLIR removeAction MAP_FlirViewOff; _flirOn = false; _flirOff = false; #loop ?(_Gunner == PLAYER)&&(!(MAP_FLIROn)): goto "FLIRON"; ?(_Gunner == PLAYER)&&(MAP_FLIROn): goto "FLIROFF"; ?(!(alive PLAYER)): goto "dead"; ?(!(gunner Cobra_FLIR == Player)): goto "Ausstieg"; ~0.2 goto "loop"; #FLIRON ?(_Gunner == PLAYER)&&(MAP_FLIROn): goto "CheckFlir"; ?((getpos Cobra_FLIR select 2) < 2): goto "FLIRON"; ?(_Gunner == PLAYER)&&(!(MAP_FLIROn))&&(!(_flirOn))&&((getpos Cobra_FLIR select 2) > 2): MAP_FlirViewOn = Cobra_FLIR addAction["FLIR ON","\map_air\data\scripts\map_flirOn.sqs","",1,false,true,"buldSelect"]; _flirOn = true; ?(!(alive PLAYER)): goto "dead"; ?(!(gunner Cobra_FLIR == Player)): goto "Ausstieg"; ~0.2 goto "FLIRON"; #FLIROFF ?(_Gunner == PLAYER)&&(!(MAP_FLIROn)): goto "CheckFlir"; ?(_Gunner == PLAYER)&&(MAP_FLIROn)&&(!(_flirOff)): MAP_FlirViewOff = Cobra_FLIR addAction["FLIR OFF","\map_air\data\scripts\map_flirOff.sqs","",1,false,true,"buldSelect"]; _flirOff = true; ?(!(alive PLAYER)): goto "dead"; ?(!(gunner Cobra_FLIR == Player)): goto "Ausstieg"; ~0.2 goto "FLIROFF"; #dead Player removeAction MAP_FlirViewOn; Player removeAction MAP_FlirViewOff; setAperture -1; exit; #Ausstieg Cobra_FLIR removeAction MAP_FlirViewOn; Cobra_FLIR removeAction MAP_FlirViewOff; setAperture -1; exit; Share this post Link to post Share on other sites
marco-polo-iv 0 Posted January 7, 2008 You tested it at day or night time? this Flir-script works only at night and higher then 2 meters regreetz Marco Share this post Link to post Share on other sites
LBpilot1 0 Posted January 7, 2008 Marco-Polo-IV @ Jan. 07 2008,16:39)]You tested it at day or night time?this Flir-script works only at night and higher then 2 meters regreetz Marco at night with an altitude of 15 Share this post Link to post Share on other sites
Jahve 0 Posted January 27, 2008 Its not really FLIR at all. It's more a color thing. Bright colors turn up whiter and dark turn up dark. Not like FLIR should be ideally, having hot things like humans and vehicles turn up white and everything else black (or vice versa depending on polarity). Share this post Link to post Share on other sites
LBpilot1 0 Posted February 10, 2008 Its not really FLIR at all. It's more a color thing. Bright colors turn up whiter and dark turn up dark. Not like FLIR should be ideally, having hot things like humans and vehicles turn up white and everything else black (or vice versa depending on polarity). I know its not real FLIR but I would like to get the color thing to work. Share this post Link to post Share on other sites