Jun Xiao 3 Posted September 11, 2018 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
SpaceHippo 26 Posted September 11, 2018 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" }; }; }; 1 Share this post Link to post Share on other sites
Jun Xiao 3 Posted September 13, 2018 (edited) 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 September 13, 2018 by Jun Xiao Share this post Link to post Share on other sites
SpaceHippo 26 Posted September 15, 2018 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" }; }; }; 1 Share this post Link to post Share on other sites
Jun Xiao 3 Posted September 15, 2018 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
SpaceHippo 26 Posted September 15, 2018 I saw that thread a few minutes after I posted. I should have used a code myself instead of digging through config files . 1 1 Share this post Link to post Share on other sites
Jun Xiao 3 Posted September 15, 2018 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 . 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. 1 Share this post Link to post Share on other sites