Jump to content

Recommended Posts

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

Not certain, but maybe this:

getNumber(configfile >> "CfgAmmo" >> "APERSMine_Range_Ammo" >> "mineBoundingDist"); //3

  • Thanks 1

Share this post


Link to post
Share on other sites
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 by beno_83au
Solved
  • Like 2

Share this post


Link to post
Share on other sites
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;
};

 

 

  • Like 1

Share this post


Link to post
Share on other sites

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
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

Ahh, no worries. Thanks for the input then anyway. 

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×