Gierasimov Posted October 3, 2021 Posted October 3, 2021 I wonder if there is a magical way to trigger a flag when player points TGP cross at an object. Say JTAC does the talk on for a building, player points to that building with TGP and flag is set or action triggered. 1 Intel Ultra 9 285K :: ROG STRIX Z890-A GAMING WIFI :: Kingston Fury 64GB :: MSI RTX 4080 Gaming X Trio :: VKB Gunfighter MK.III MCG Ultimate :: VPC MongoosT-50 CM3 :: non-VR :: single player :: open beta
sirrah Posted October 3, 2021 Posted October 3, 2021 1 hour ago, Gierasimov said: I wonder if there is a magical way to trigger a flag when player points TGP cross at an object. Say JTAC does the talk on for a building, player points to that building with TGP and flag is set or action triggered. I too would like to know if such magic can be achieved 1 System specs: i7-8700K @stock speed - GTX 1080TI @ stock speed - AsRock Extreme4 Z370 - 32GB DDR4 @3GHz- 500GB SSD - 2TB nvme - 650W PSU HP Reverb G1 v2 - Saitek Pro pedals - TM Warthog HOTAS - TM F/A-18 Grip - TM Cougar HOTAS (NN-Dan mod) & (throttle standalone mod) - VIRPIL VPC Rotor TCS Plus with ALPHA-L grip - Pointctrl & aux banks <-- must have for VR users!! - Andre's SimShaker Jetpad - Fully adjustable DIY playseat - VA+VAICOM - Realsimulator FSSB-R3 ~ That nuke might not have been the best of ideas, Sir... the enemy is furious ~ GUMMBAH
AKA_Clutter Posted October 3, 2021 Posted October 3, 2021 I know that someone developed a script for the SA342 to lase targets for other planes. It uses the sight in the SA342M. Given this< I would think what you want to do is possible. I will see if I can find the thread. ---------------- AKA_Clutter Win 10 Pro, Intel i7 12700k @4.6 GHz, EVGA RTX 3080 FTW, Ultra 64 GB G.Skill DDR4 3600 RAM, Acer 27" flat screen, HP Reverb G2, TM Warthog HOTAS with Virpil warBRD base, MFG Rudder Pedals, Virpil TCS Rotor Base with AH-64Dcollective, TrackIR 5 Pro w/Vector Expansion, PointCTRL.
Gierasimov Posted October 3, 2021 Author Posted October 3, 2021 3 hours ago, AKA_Clutter said: I know that someone developed a script for the SA342 to lase targets for other planes. It uses the sight in the SA342M. Given this< I would think what you want to do is possible. I will see if I can find the thread. Interesting lead. Intel Ultra 9 285K :: ROG STRIX Z890-A GAMING WIFI :: Kingston Fury 64GB :: MSI RTX 4080 Gaming X Trio :: VKB Gunfighter MK.III MCG Ultimate :: VPC MongoosT-50 CM3 :: non-VR :: single player :: open beta
AKA_Clutter Posted October 3, 2021 Posted October 3, 2021 Here is the thread I talked about above. ---------------- AKA_Clutter Win 10 Pro, Intel i7 12700k @4.6 GHz, EVGA RTX 3080 FTW, Ultra 64 GB G.Skill DDR4 3600 RAM, Acer 27" flat screen, HP Reverb G2, TM Warthog HOTAS with Virpil warBRD base, MFG Rudder Pedals, Virpil TCS Rotor Base with AH-64Dcollective, TrackIR 5 Pro w/Vector Expansion, PointCTRL.
cfrag Posted October 4, 2021 Posted October 4, 2021 (edited) Thanks, @AKA_Clutter - that script is quite ingenious. What it does (from my cursory inspection) is that it takes a fixture mounted on the Zelle, and "walks down" the ray to find the point on the ground where it intersects (ray's altitude is below land.getHeight()), then looks up the vehicles that are located in the vicinity via world.searchObjects() to return the first one it finds, and then places a laser dot onto it (really ingeniously done - due to how the script works, no LOS testing is required as that's part of the algorithm itself). So yes, theoretically it can be done for all TGP (and other items, like pilot's helmet mounted visors). There are some caveats, though: You must know the internal (private) ArgumentValue for the TGP, which I suspect to be different for most planes that have it, and it (the TGP) has to be mounted on the airframe and active This works well with the Gazelle because it moves slowly (usually hovers to target vehicles), and it's usually close to the ground. The way the ground intersection algorithm works (the script walks down the ray to see if it's below the ground altitude of the spot on the beam) can be erratic for longer distances because of the greater angle error. This means that it may not work as well for high-flying planes. Optimizing this function using binary space partition (instead of the 5-step partition algorithm used now) may shave off a few iterations (start with 20km and halve the distance each iteration will give you a resolution of 30 cm after 16 iterations, a better resolution may require some additional iterations. The original script has an expected average of 25 iterations - minimum 5, maximum 50 - with a resolution of 10 cm). However, since the Gazelle is close to the ground, I expect the median of iterations to be close to 20, and BSP may introduce LOS errors and may actually end up performing worse. In any event, invoking world.searchObjects() is expensive, probably more expensive than walking the ray (although land.getHeight() may also be expensive because of the required interpolation between the four surrounding grid points). So invoking this function will likely eat a non-trivial amount of performance. Planes move really fast, especially compared to a hovering helicopter (the script uses a resolution of 10 cm for targeting; a plane moving at 300 KIAS covers 15430 cm per second). Detecting a hit onto a target with the TGP may require a finer resolution than the current 10 checks per second. If you amp up the sampling rate then you may be looking at a perceptible performance hit for relatively little gain (knowing if a TGP has looked at a specific object). However, since a TGP can ground-lock, perhaps a single check per second suffices. Please don't misunderstand what I write above: that script by @CakeSorbus is really ingenious - full kudos. What I'm saying is that a generalized version of such a function can likely only be done efficiently by ED and their partners, and it would have a limited scope (only airframes with TGP can use it), yet if the trigger is present, it has to be active all the time for all missions, even those that do not have airframes with an active TGP, and if it would have to be run for every player-owned airframe in an MP mission. What I'm saying is this: From a performance perspective, I'm not sure I want that as a general feature for missions in ME. Edited October 4, 2021 by cfrag
AKA_Clutter Posted October 4, 2021 Posted October 4, 2021 7 hours ago, cfrag said: Thanks, @AKA_Clutter - that script is quite ingenious. What it does (from my cursory inspection) is that it takes a fixture mounted on the Zelle, and "walks down" the ray to find the point on the ground where it intersects (ray's altitude is below land.getHeight()), then looks up the vehicles that are located in the vicinity via world.searchObjects() to return the first one it finds, and then places a laser dot onto it (really ingeniously done - due to how the script works, no LOS testing is required as that's part of the algorithm itself). So yes, theoretically it can be done for all TGP (and other items, like pilot's helmet mounted visors). There are some caveats, though: ... ... : From a performance perspective, I'm not sure I want that as a general feature for missions in ME. WOW! Thanks for the detail walk though of the script. This should help @Gierasimov to determine if they can do what they want to. It will also help me as I am trying to learn scripting and lua itself. ---------------- AKA_Clutter Win 10 Pro, Intel i7 12700k @4.6 GHz, EVGA RTX 3080 FTW, Ultra 64 GB G.Skill DDR4 3600 RAM, Acer 27" flat screen, HP Reverb G2, TM Warthog HOTAS with Virpil warBRD base, MFG Rudder Pedals, Virpil TCS Rotor Base with AH-64Dcollective, TrackIR 5 Pro w/Vector Expansion, PointCTRL.
Gierasimov Posted October 4, 2021 Author Posted October 4, 2021 Thanks. Intel Ultra 9 285K :: ROG STRIX Z890-A GAMING WIFI :: Kingston Fury 64GB :: MSI RTX 4080 Gaming X Trio :: VKB Gunfighter MK.III MCG Ultimate :: VPC MongoosT-50 CM3 :: non-VR :: single player :: open beta
Gierasimov Posted October 4, 2021 Author Posted October 4, 2021 OK, looked at it and I don't think its anywhere close to what I had in mind. Too complex as well. Essentially, targeting pod gives range to the crosshairs so there must be already a method in place to know exact location of where is it looking and what is it looking at. Maybe one day Intel Ultra 9 285K :: ROG STRIX Z890-A GAMING WIFI :: Kingston Fury 64GB :: MSI RTX 4080 Gaming X Trio :: VKB Gunfighter MK.III MCG Ultimate :: VPC MongoosT-50 CM3 :: non-VR :: single player :: open beta
Recommended Posts