OFPEC Forum

Addons & Mods Depot => OFP - Addons & Mods General => Topic started by: Lenyoga on 23 Jan 2013, 18:19:18

Title: CfgWeapons problem - how to remove drop action for magazines
Post by: Lenyoga on 23 Jan 2013, 18:19:18
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;
};
Title: Re: CfgWeapons problem - how to remove drop action for magazines
Post by: Lenyoga on 05 Feb 2013, 13:01:49
So I am indeed the last person on earth spending their free time with OFP...
Title: Re: CfgWeapons problem - how to remove drop action for magazines
Post by: h- 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..
Title: Re: CfgWeapons problem - how to remove drop action for magazines
Post by: Lenyoga 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.