Jump to content
Ibragim A

check if the explosive device is a simple step on mine or if it has a remote detonator

Recommended Posts

Hi. Is there a stable way to check if the explosive device is a simple step on mine or if it has a remote detonator (can be activated from a distance using the action menu)? I want to make a function that distinguishes these two types of explosive devices. Tried to find these differences in the config viewer but no result.
For example, if a player has "DemoCharge_Remote_Mag", "ATMine_Range_Mag", and "APERSTripMine_Wire_Mag" in his inventory, only "DemoCharge_Remote_Mag" should be returned as distance detonable.
Thanks.

Share this post


Link to post
Share on other sites

try with (_ammoName isKindOf "TimeBombCore")

 

that's what I use

 

Share this post


Link to post
Share on other sites
1 hour ago, gc8 said:

try with (_ammoName isKindOf "TimeBombCore")

 

that's what I use

 

Thanks for the tip. This method is not completely stable, for example, it defines "APERSMine_Range_Ammo" as a remote device. Also there is the same problem with devices from RHS addons. It seems to me that we need to find a way to determine if a specific action Touch off bomb is added after the putting of this explosive device. But this should be checked through a script, not by putting this charge and checking for an action menu.

Share this post


Link to post
Share on other sites

What about something like:

 

 _acfg = (configfile >> "Cfgammo" >> _ammo);


 gettext(_acfg >> "mineTrigger") != "RemoteTrigger"

 

it's been a while since I worked on this stuff

  • Like 2

Share this post


Link to post
Share on other sites
1 hour ago, gc8 said:

What about something like:

 


 _acfg = (configfile >> "Cfgammo" >> _ammo);


 gettext(_acfg >> "mineTrigger") != "RemoteTrigger"

 

it's been a while since I worked on this stuff

Yes, it worked just like I thought. Thanks for the help, I don’t know why I didn’t see this parameter in the config.

PC_fn_check_if_mine_trigger_is_remote = 
	{
		params ["_magazine"];
		
		private _is_remote = false;
		
		private _ammo = getText (configFile >> "CfgMagazines" >> _magazine >> "ammo");
		
		private _trigger = gettext (configFile >> "CfgAmmo" >> _ammo >> "mineTrigger");
		
		if (_trigger in ["RemoteTrigger"]) then 
			{
				_is_remote = true;
			};

		_is_remote;		
	};

[_magazine] call PC_fn_check_if_mine_trigger_is_remote; // _magazine - magazine in unit's inventory 

 

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

×