Blu3dr4g0n Posted May 26, 2012 Share Posted May 26, 2012 Hello, Game : DCS:10C 1.1.1.1 I'm trying to get information about my target, but when i used the LoGetLockedTargetInformation() it doesn't work. What i'm trying to do is to get the coalition info of the TGP target (just after creating the SPI point for the CCRP mode). Also, can we get the IFF Switch information (ON / OFF). I know that it is not yet implemented, but i would be cool to get its value. Thanx for any idea and reply, :pilotfly: Here's my code : -- BlueDragon IFF for DCS:A10C -- Copyright © 2012 - http://www.3rd-wing.net -- http://www.3rd-wing.net/index.php?showuser=2983 -- Headers dofile("./Config/World/World.lua") -- Required to get mission date dofile("./Scripts/Database/wsTypes.lua") -- Required to get object types definitions BlueDragonIFF= { -- Version Version = 0.1, --Logs LogLevel = 2, --Niveau 0 / 1 / 2 [OFF / Warning / Full] LogFileName = lfs.writedir() .. "Logs\\BlueDragonIFF_"..os.date("!%Y-%m-%d_%H%M%S",now)..".log", --Nom du log au format <nomfichier_date>.log LogFilePtr = nil, -- ___________ --/ LOGSTART()\ ------------------------------------------------------------------------------ -- Fonction d'ouverture et initialisation du log ------------------------------------------------------------------------------ LogStart = function(self) self.LogFilePtr = io.open(self.LogFileName, "w+"); self:LogWrite(0, "BlueDragon IFF for DCS:A10C - V"..self.Version); self:LogWrite(0, "Copyright © 2012 - http://www.3rd-wing.net"); self:LogWrite(0, "Version : "..self.Version); self:LogWrite(0, ""); local Player = LoGetObjectById(LoGetPlayerPlaneId()); self:LogWrite(0, "Joueur : "..LoGetPilotName().." | ID : "..LoGetPlayerPlaneId()); self:LogWrite(2, "Country : "..Player.Country); self:LogWrite(2, "Coalition : "..Player.Coalition); end, -- ___________ --/ LOGWRITE()\ ------------------------------------------------------------------------------ --Fonction d'écriture de message dans le log -- DebugLevel : Number -- message : String ------------------------------------------------------------------------------ LogWrite = function(self, DebugLevel, message) if (DebugLevel <= self.LogLevel) then self.LogFilePtr:write("["..os.date("!%H:%M:%SZ",now).."] "..message.."\n"); end end, -- ___________ -- / LOGCLOSE()\ ------------------------------------------------------------------------------ -- Fonction d'ouverture et initialisation du log ------------------------------------------------------------------------------ LogClose=function(self) self:LogWrite(2, "Fermeture du log"); self.LogFilePtr:flush(); self.LogFilePtr:close(); end, -- _______________ -- / TargetUpdate()\ ------------------------------------------------------------------------------ -- Fonction de mise à jour des infos de la cible (IFF) ------------------------------------------------------------------------------ TargetUpdate=function(self) local Target = LoGetObjectById(LoGetLockedTargetInformation()["ID"]); if (Target ~= nil) then self:LogWrite(2, "--LockedTarget"); self:LogWrite(2, "Name : "..Target.Name); self:LogWrite(2, "Country : "..Target.Country); self:LogWrite(2, "Coalition : "..Target.Coalition); end end, } --============================================================= -- (Hook) Appel 1 fois juste avant le démarrage de la mission --============================================================= do local PrevLuaExportStart=LuaExportStart; LuaExportStart=function() BlueDragonIFF:LogStart(); if PrevLuaExportStart then PrevLuaExportStart(); end end end --============================================================= -- (Hook) Appel avant chaque frame de la simulation --============================================================= do local PrevLuaExportBeforeNextFrame=LuaExportBeforeNextFrame; LuaExportBeforeNextFrame=function() if PrevLuaExportBeforeNextFrame then PrevLuaExportBeforeNextFrame(); end end end --============================================================= -- (Hook) Appel apres chaque frame de la simulation --============================================================= do local PrevLuaExportAfterNextFrame=LuaExportAfterNextFrame; LuaExportAfterNextFrame=function() if LoGetLockedTargetInformation() ~= nil then BlueDragonIFF:TargetUpdate(); end if PrevLuaExportAfterNextFrame then PrevLuaExportAfterNextFrame(); end end end --============================================================= -- (Hook) Appel apres la fin de la mission --============================================================= do local PrevLuaExportStop=LuaExportStop; LuaExportStop=function() BlueDragonIFF:LogClose(); if PrevLuaExportStop then PrevLuaExportStop(); end end end W7 pro 64bits - I5 750 @2.75Ghz - 8Go RAM Corsair @1600Mhz - ATI 5850 1Go DDR5 - x52Pro - TrackIR 4 French user - keep cool with my english :) Link to comment Share on other sites More sharing options...
nomdeplume Posted May 28, 2012 Share Posted May 28, 2012 Does LoGetLockedTargetInformation() return anything at all? Maybe it's not implemented in DCS and refers to things like up by e.g. the F15 radar? Or padlocked targets? Given the name and age/context of what I found Googling that function, my guess is that it'd be LockOn specific and DCS A-10C may not have the same notion of 'locking' a target. Link to comment Share on other sites More sharing options...
Druid_ Posted May 28, 2012 Share Posted May 28, 2012 (edited) There is no such function within DCS I'm afraid. You can return the coalition of an object but it's not possible to return any information from the target displayed in the TGP in the current version. Out of interest why do you require the coalition of the target in your targeting pod? I.e what are you trying to achieve. Edited May 28, 2012 by Druid_ i7-7700K : 16Gb DDR4 2800 Mhz : Asus Mobo : 2TB HDD : Intel 520 SSD 240gb : RTX 2080ti: Win10 64pro : Dx10 : TrackiR4 : TM Warthog : ASUS ROG SWIFT PG348Q Link to comment Share on other sites More sharing options...
Blu3dr4g0n Posted May 28, 2012 Author Share Posted May 28, 2012 Hi Druid, thanx for the response. i see that IFF is not implemented but EPLRS does and i've got the information on the TAD page (with green little cross). But i've nothing on the TGP : what i try to achieve is to get the information on my X52 Pro, in order to bypass the "manual identification pass" (yes, it's bad, i know :D). I've found an another solution ;) (a less tricky one) i'm using the edModelViewer and make a slight encyclopedia of the most used unit, to improve the identification process. thanx for replying, and have a good day, kingest regards, W7 pro 64bits - I5 750 @2.75Ghz - 8Go RAM Corsair @1600Mhz - ATI 5850 1Go DDR5 - x52Pro - TrackIR 4 French user - keep cool with my english :) Link to comment Share on other sites More sharing options...
shagrat Posted May 31, 2012 Share Posted May 31, 2012 Ehm, the green cross for friendlies is displayed in the TGP screen as well! Only thing necessary is EPLRS on the unit available and active... Per group you get a green cross indicator. You can even "lock" that cross in the TAD and track it with the TGP! It will follow the jumping EPLRS coordinates. :thumbup: Shagrat - Flying Sims since 1984 - Win 10 | i5 10600K@4.1GHz | 64GB | GeForce RTX 3090 - Asus VG34VQL1B | TrackIR5 | Simshaker & Jetseat | VPForce Rhino Base & VIRPIL T50 CM2 Stick on 200mm curved extension | VIRPIL T50 CM2 Throttle | VPC Rotor TCS Plus/Apache64 Grip | MFG Crosswind Rudder Pedals | WW Top Gun MIP | a hand made AHCP | 2x Elgato StreamDeck (Buttons galore) Link to comment Share on other sites More sharing options...
Druid_ Posted May 31, 2012 Share Posted May 31, 2012 ^ unfortunately the majority of friendly units in DCS do not have EPRLS hence the posters attempt at a workaround. i7-7700K : 16Gb DDR4 2800 Mhz : Asus Mobo : 2TB HDD : Intel 520 SSD 240gb : RTX 2080ti: Win10 64pro : Dx10 : TrackiR4 : TM Warthog : ASUS ROG SWIFT PG348Q Link to comment Share on other sites More sharing options...
WildBillKelsoe Posted May 31, 2012 Share Posted May 31, 2012 c'est pas faux. Je pense le sim ne pas ajoutez le fonctionne. -< Sorry bad french. What I say is sim don't have such function. AWAITING ED NEW DAMAGE MODEL IMPLEMENTATION FOR WW2 BIRDS Fat T is above, thin T is below. Long T is faster, Short T is slower. Open triangle is AWACS, closed triangle is your own sensors. Double dash is friendly, Single dash is enemy. Circle is friendly. Strobe is jammer. Strobe to dash is under 35 km. HDD is 7 times range key. Radar to 160 km, IRST to 10 km. Stay low, but never slow. Link to comment Share on other sites More sharing options...
shagrat Posted May 31, 2012 Share Posted May 31, 2012 ^ unfortunately the majority of friendly units in DCS do not have EPRLS hence the posters attempt at a workaround. My answer was related to the above statement: " i see that IFF is not implemented but EPLRS does and i've got the information on the TAD page (with green little cross). But i've nothing on the TGP " If you have EPLRS on the friendly it should show on TGP screen. I know most Georgian, German, Italian etc don't have it, hence the "if available" statement. The encyclopedia/pictures approach is the best. Train to recognize what is what on the TGP. Did this for SAM and AAA. Still learning ;) Shagrat - Flying Sims since 1984 - Win 10 | i5 10600K@4.1GHz | 64GB | GeForce RTX 3090 - Asus VG34VQL1B | TrackIR5 | Simshaker & Jetseat | VPForce Rhino Base & VIRPIL T50 CM2 Stick on 200mm curved extension | VIRPIL T50 CM2 Throttle | VPC Rotor TCS Plus/Apache64 Grip | MFG Crosswind Rudder Pedals | WW Top Gun MIP | a hand made AHCP | 2x Elgato StreamDeck (Buttons galore) Link to comment Share on other sites More sharing options...
Recommended Posts