Home   Help Search Login Register  

Author Topic: CfgWeapons problem - how to remove drop action for magazines  (Read 1829 times)

0 Members and 1 Guest are viewing this topic.

Offline Lenyoga

  • Professor of Misanthropology
  • Members
  • *
Good evening, I'm right now working on a melee weapon for a Mod, but I've encountered a stupid problem with the config. I can drop the magazines, and that's annoying. Is there a way to prevent this? Or at least to only make the weapon itself droppable?

Code: [Select]
class LNN_Sh3_Wrench1: GrenadeLauncher
{
scopeWeapon=0;
scopeMagazine=0;
magazineType=0;
weaponType=WeaponHardMounted;
Ammo="LNN_Sh3_WrHit";
displayName="Wrench";
displayNameMagazine="Wrench";
shortNameMagazine="Wrench";
sound[]={"\LNN_Sh3b\swing1.wav",1,1};
reloadMagazineSound[]={,1,1};
reloadSound[]={,1,1};
reloadTime=0.402;
count=99999;
magazines[]={"LNN_Sh3_Wrench1Mag"};
picture="\LNN_Sh3b\w_pist.paa";
modelMagazine="\misc\mag_univ.p3d";
cursor = w_weapon;
cursorAim = w_lock;
maxLeadSpeed=1;
canDrop = false;
};

class LNN_Sh3_Wrench1Mag: LNN_Sh3_Wrench1
{
scopeMagazine=0;
magazineType=0;
picture="\LNN_Sh3b\w_pist.paa";
canDrop = false;
};
As a grandmother I've got lots of gold.

Offline Lenyoga

  • Professor of Misanthropology
  • Members
  • *
Re: CfgWeapons problem - how to remove drop action for magazines
« Reply #1 on: 05 Feb 2013, 13:01:49 »
So I am indeed the last person on earth spending their free time with OFP...
As a grandmother I've got lots of gold.

Offline h-

  • OFPEC Site
  • Administrator
  • *****
  • Formerly HateR_Kint
    • OFPEC
Re: CfgWeapons problem - how to remove drop action for magazines
« Reply #2 on: 05 Feb 2013, 16:44:42 »
OFP has the StrokeGun and StrokeFist definitions so have you tried using them instead of a nade launcher?

Not sure if they're only usable via action menu though..
Project MCAR   ---   Northern Fronts   ---   Emitter 3Ditor
INFORMATIVE THREAD TITLES PLEASE. "PLEASE HELP" IS NOT ONE..
Chuck Norris can divide by zero.

Offline Lenyoga

  • Professor of Misanthropology
  • Members
  • *
Re: CfgWeapons problem - how to remove drop action for magazines
« Reply #3 on: 06 Feb 2013, 00:01:05 »
I tried the StrokeGun class a few times before, but the results weren't too good... But that's actually a very good point - I might use StrokeGun for the player unit and the gLauncher-based solution for AI units. Thanks for the reply - I already cut StrokeGun out of my cortex (literally), but I'll see how far I can bend it to fit my needs.
As a grandmother I've got lots of gold.