Jump to content
Jun Xiao

About the AI placement RHS pfm-1 question, who can help me? Thanks!

Recommended Posts

I want to do a task. Allow AI to place RHS pfm-1 mines.
The way I tried the original:
Unit firepower ["BoundingMineRangeMuzzle", "BoundingMineRangeMuzzle", "APERSBoundingMine_Range_Mag"];
It works, but how do you use RHS to achieve the same effect?
What are "BoundingMineRangeMuzzle" and "APERSBoundingMine_Range_Mag"? How do you get them from RHS's pfm-1?
Thanks!

Share this post


Link to post
Share on other sites

From what I understand, "BoundingMineRangeMuzzle" is the muzzle name for the 'put' weapon. "APERSBoundingMine_Range_Mag" is a magazine name.
After searching through a countless amount of config.cpp files I found (hopefully) what you are looking for:

unit fire ["Rhs_SmallMine_Muzzle", "Rhs_SmallMine_Muzzle", "rhs_mag_mine_pfm1"];

 

To get the muzzle and magazine name, I found the 'put' weapon class which RHS edited to add the PFM-1 mine. Shown below:
 

Spoiler

class Put: Default
{
	muzzles[]+=
	{
		"Rhs_SmallMine_Muzzle"
	};
	class PutMuzzle: Default
	{
	};
	class Rhs_SmallMine_Muzzle: PutMuzzle
	{
		magazines[]=
		{
			"rhs_mag_mine_pfm1",
			"rhs_mag_mine_ptm1"
		};
	};
};

 


 

  • Thanks 1

Share this post


Link to post
Share on other sites
On 2018/9/12 at 5:45 AM, SpaceHippo said:

From what I understand, "BoundingMineRangeMuzzle" is the muzzle name for the 'put' weapon. "APERSBoundingMine_Range_Mag" is a magazine name.
After searching through a countless amount of config.cpp files I found (hopefully) what you are looking for:


unit fire ["Rhs_SmallMine_Muzzle", "Rhs_SmallMine_Muzzle", "rhs_mag_mine_pfm1"];

 

To get the muzzle and magazine name, I found the 'put' weapon class which RHS edited to add the PFM-1 mine. Shown below:
 

  Hide contents


class Put: Default
{
	muzzles[]+=
	{
		"Rhs_SmallMine_Muzzle"
	};
	class PutMuzzle: Default
	{
	};
	class Rhs_SmallMine_Muzzle: PutMuzzle
	{
		magazines[]=
		{
			"rhs_mag_mine_pfm1",
			"rhs_mag_mine_ptm1"
		};
	};
};

 


 

SpaceHippo

I'm sorry I just saw your answer,Thank you for taking so long to help me find the answer.The AI planted mines.

May I ask you a question ? How did you get RHS pfm-1 muzzle and magazine name?

Thanks.

Spoiler

 

 

Edited by Jun Xiao

Share this post


Link to post
Share on other sites
On 9/13/2018 at 2:39 AM, Jun Xiao said:

SpaceHippo

I'm sorry I just saw your answer,Thank you for taking so long to help me find the answer.The AI planted mines.

May I ask you a question ? How did you get RHS pfm-1 muzzle and magazine name?

Thanks.

  Reveal hidden contents

 

 

 

Sorry, for taking a while to respond, Jun Xiao.

Addon/Mod PBOs have a file called config.cpp. I scrolled through a few config files until I found the "put" Weapon class. That weapon had all the info you required. In my previous message, you can see where the muzzle name is and the magazine name in the hiddent contents.

On 9/11/2018 at 5:45 PM, SpaceHippo said:

 

  Reveal hidden contents


class Put: Default
{
	muzzles[]+=
	{
		"Rhs_SmallMine_Muzzle"
	};
	class PutMuzzle: Default
	{
	};
	class Rhs_SmallMine_Muzzle: PutMuzzle
	{
		magazines[]=
		{
			"rhs_mag_mine_pfm1",
			"rhs_mag_mine_ptm1"
		};
	};
};

 


 

 

  • Thanks 1

Share this post


Link to post
Share on other sites
2 minutes ago, SpaceHippo said:

 

Sorry, for taking a while to respond, Jun Xiao.

Addon/Mod PBOs have a file called config.cpp. I scrolled through a few config files until I found the "put" Weapon class. That weapon had all the info you required. In my previous message, you can see where the muzzle name is and the magazine name in the hiddent contents.

 

It's Fine,Thank you, SpaceHippo.

Now I know that I can use the code to get the muzzle name and magazine name.

But what bothers me now is,how to use AI to trigger rifle ammunition

 

 

Share this post


Link to post
Share on other sites

I saw that thread a few minutes after I posted. I should have used a code myself instead of digging through config files :face_palm:.

  • Thanks 1
  • Haha 1

Share this post


Link to post
Share on other sites
35 minutes ago, SpaceHippo said:

I saw that thread a few minutes after I posted. I should have used a code myself instead of digging through config files :face_palm:.

Nope, thanks for you help.

You've helped me, even if you tell me in code, I probably don't understand.

So other people can only tell me how to do it by video.:face_palm:

  • Like 1

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

×