beno_83au 1352 Posted October 24, 2020 Does anyone know how I can get the range than a mine will trigger at? I've had a look through one of the configs for a mine but didn't find it, or what I thought would be it. Thanks. Share this post Link to post Share on other sites
phronk 861 Posted October 24, 2020 Not certain, but maybe this: getNumber(configfile >> "CfgAmmo" >> "APERSMine_Range_Ammo" >> "mineBoundingDist"); //3 1 Share this post Link to post Share on other sites
beno_83au 1352 Posted October 24, 2020 (edited) 2 hours ago, phronk said: Not certain, but maybe this: getNumber(configfile >> "CfgAmmo" >> "APERSMine_Range_Ammo" >> "mineBoundingDist"); //3 Mmmmmm, not quite it. But thanks though, because I had only been looking at CfgVehicles. I didn't end up finding anything matching the trigger distances (using distance2D from the player) for APERS Mine (~1m) and APERS Bounding Mine (~2.5m) in either CfgAmmo or CfgVehicles. Obviously I could just hard code a solution, but that's cheating 😄 Edit: Ohhhh, crazy I know, but the answer was in CfgMineTriggers: _mineAmmo = getText (configfile >> "CfgAmmo" >> "APERSMine_Range_Ammo" >> "mineTrigger"); getNumber (configfile >> "CfgMineTriggers" >> _mineAmmo >> "MineTriggerRange"); //1 _mineAmmo = getText (configfile >> "CfgAmmo" >> "APERSBoundingMine_Range_Ammo" >> "mineTrigger"); getNumber (configfile >> "CfgMineTriggers" >> _mineAmmo >> "MineTriggerRange"); //3 Cheers for pointing me at CfgAmmo Phronk 🙂 Edited October 24, 2020 by beno_83au Solved 2 Share this post Link to post Share on other sites
Larrow 2674 Posted October 24, 2020 configfile >> "CfgAmmo" >> "APERSBoundingMine_Range_Ammo" mineTrigger = "RangeTriggerBounding"; configfile >> "CfgMineTriggers" >> "RangeTriggerBounding" class RangeTriggerBounding: RangeTrigger { mineTriggerRange=3; //<--- mineTriggerActivationRange=5; restrictZoneCenter[]={0,0,0}; restrictZoneRadius=5; mineDelay=1; }; configfile >> "CfgAmmo" >> "APERSMine_Range_Ammo" mineTrigger = "RangeTriggerShort"; configfile >> "CfgMineTriggers" >> "RangeTriggerShort" class RangeTriggerShort: RangeTrigger { mineTriggerRange=1; //<--- mineTriggerActivationRange=3; }; ? RangeTrigger definition is in a3/Dta/bin.pbo Spoiler class Default { scope=0; mineTriggerType="radius"; mineTriggerRange=2; mineTriggerMass=30; mineDelay=0.2; mineMagnetic=0; mineUnderwaterOnly=0; mineWireStart[]={0,1,0}; mineWireEnd[]={0,1,5}; restrictZoneCenter[]={0,0,0}; restrictZoneRadius=3; timerStep=-1; }; class RangeTrigger: Default { mineTriggerType="radius"; mineTriggerRange=2; mineTriggerMass=30; mineMagnetic=0; }; 1 Share this post Link to post Share on other sites
beno_83au 1352 Posted October 25, 2020 Sorry @Larrow, are you trying to tell me how to set a mine's trigger range with a config? I'm not quite 100% sure what you're trying to say otherwise. What I was after was just to read a mine's trigger range for use in a script. Share this post Link to post Share on other sites
Larrow 2674 Posted October 25, 2020 7 hours ago, beno_83au said: Sorry @Larrow, are you trying to tell me how to set a mine's trigger range with a config? No, was just showing you where the range is defined. Although I noticed after posting you had updated your post with the answer, whilst I was writing mine. Share this post Link to post Share on other sites
beno_83au 1352 Posted October 25, 2020 Ahh, no worries. Thanks for the input then anyway. Share this post Link to post Share on other sites