Home   Help Search Login Register  

Author Topic: Minigun magazine  (Read 6941 times)

0 Members and 1 Guest are viewing this topic.

Offline Plane

  • Members
  • *
  • You can call me my nickname "Plane"!
Minigun magazine
« on: 11 Jan 2005, 12:25:39 »
Now I'm making a M134 minigun and I want the Picture of it's magazine take 4 places (As size of 4 M16 mags).
And I used the "magazinetype="4*256";" in the config.cpp.
But OFP crashed when reading my addon.

 ???
What's the problem? Can anyone help me?
The propeller is just a big fan in front of the plane used to keep the pilot cool. When it stops, you can actually watch the pilot start sweating.

Offline RujiK

  • Members
  • *
  • KoKo Puh-Fizzles!
Re:Minigun magazine
« Reply #1 on: 11 Jan 2005, 19:25:26 »
Woah! That thing is sweet!
Personally I have no experience in object editing so I cant help you, but I look forward too the release of that gun!
I like your approach, lets see your departure.
Download the New Flashlight Script!

Offline Pilot

  • Contributing Member
  • **
Re:Minigun magazine
« Reply #2 on: 11 Jan 2005, 20:37:59 »
Try changing magazinetype to:
Quote
magazineType = WeaponSlotItem;

I'm assuming 256 means the number of bullets per magazine.  To have each magazine contain 256 bullets, put this in the CfgWeapon part of the config:
Quote
count=256;

Hopefully this will keep OFP from crashing, but I'm not sure if it will solve your problem.  I'm not sure what defines how many slots a magazine takes up.

EDIT:

Ok, I have been looking through the commented config, and hopefully have the answer to your question
Quote
magazineType = WeaponSlotItem;
This will make the magazine take up one slot

Quote
magazineType = 2 * WeaponSlotItem;
This will make the magazine take up two slots.

So adjusting the multiplier will adjust the number of slots the magazine takes up.

« Last Edit: 11 Jan 2005, 20:41:37 by Student Pilot »

Offline Plane

  • Members
  • *
  • You can call me my nickname "Plane"!
Re:Minigun magazine
« Reply #3 on: 12 Jan 2005, 11:12:22 »
Good! :thumbsup:
I used the following command:

magazineType = 2 * WeaponSlotItem;

And it works, but I change the multiplier to 3 and I've tried 4, OFP also crashes.

If someone reply me,you can also leave your e-mail address.I'll sent you when release! :gunman:
The propeller is just a big fan in front of the plane used to keep the pilot cool. When it stops, you can actually watch the pilot start sweating.

Offline Pilot

  • Contributing Member
  • **
Re:Minigun magazine
« Reply #4 on: 12 Jan 2005, 14:52:20 »
This may be a game engine limitation.  Operation Flashpint may only allow magazines to take up 1, 2, and 6 slots.  I haven't seen any other magazine that takes up 3, 4, or 5 slots.  I'll keep checking and see if I can find a definite answer.

Offline greg147

  • Contributing Member
  • **
    • Royal Air Assault Battalion
Re:Minigun magazine
« Reply #5 on: 12 Jan 2005, 19:10:57 »
The UKF law launcher has a round that takes up 4 spaces. I think  :P
Royal Air Assault Battalion - [L/Cpl] Greg
RAAB

Offline Pilot

  • Contributing Member
  • **
Re:Minigun magazine
« Reply #6 on: 13 Jan 2005, 02:40:41 »
Really?  Ok, then forget my last post :P

Make sure you typed it exactly as I have it here:

Code: [Select]
magazineType = 4 * WeaponSlotItem;
If that doesn't work, download the UKF law launcher and see how they did it.

Offline Plane

  • Members
  • *
  • You can call me my nickname "Plane"!
Re:Minigun magazine
« Reply #7 on: 13 Jan 2005, 05:48:52 »
I also found ICP's RPG-26 magazine take 4 places, it uses "magazinetype= 4 * 256;" in config.

I also tried "magazinetype= 4 * 100;" in my Minigun config, OFP didn't crash but Magazine take only one slot but not 4 slots.
And "magazinetype= 4 * WeaponSlotItem;" also cause OFP crashes. ???

Is the problem in the head of config:
"#denife WeaponSlotItem     256//"
 ???
The propeller is just a big fan in front of the plane used to keep the pilot cool. When it stops, you can actually watch the pilot start sweating.

Offline Planck

  • Honoured
  • Former Staff
  • ****
  • I'm never wrong ....I'm just not always right !
Re:Minigun magazine
« Reply #8 on: 13 Jan 2005, 05:58:00 »
denife???

I think that should be define


Planck
I know a little about a lot, and a lot about a little.

Offline Plane

  • Members
  • *
  • You can call me my nickname "Plane"!
Re:Minigun magazine
« Reply #9 on: 13 Jan 2005, 12:06:36 »
Yeah,sorry for the spelling mistake.

I tried "magazinetype= 6 * 100" but it only take 2 slots.
"magazinetype= 4 * WeaponSlotItem;" will cause OFP crashes.

And is MM-1 take 8 slots?but its config use bin file. I can't open it.
The propeller is just a big fan in front of the plane used to keep the pilot cool. When it stops, you can actually watch the pilot start sweating.

Offline Pilot

  • Contributing Member
  • **
Re:Minigun magazine
« Reply #10 on: 13 Jan 2005, 14:59:11 »
Can you post the config for ICP's RPG-26?

Offline Planck

  • Honoured
  • Former Staff
  • ****
  • I'm never wrong ....I'm just not always right !
Re:Minigun magazine
« Reply #11 on: 14 Jan 2005, 03:13:00 »
Here is a portion of the relevant config for MM-1.

Code: [Select]
class Mm1Base:GrenadeLauncher
      {
      scopeWeapon=1;
      scopeMagazine=1;
      weaponType="1 +    16";
      magazineType="8 *          256";
      displayName="$STR_DN_MM1";
      displayNameMagazine="$STR_DN_MM1";
      shortNameMagazine="$STR_DN_MM1";
      count=12;
      reloadTime=0.5;
      magazineReloadTime=12;
      model="\MM-1\MM-1";
      modelOptics="\MM-1\optika_MM-1";
      picture="\MM-1\mm-1.paa";
      revolving="buben";
      revolvingAxis="osa_buben";
      };

Planck
« Last Edit: 14 Jan 2005, 03:14:35 by Planck »
I know a little about a lot, and a lot about a little.

Offline Plane

  • Members
  • *
  • You can call me my nickname "Plane"!
Re:Minigun magazine
« Reply #12 on: 14 Jan 2005, 17:03:45 »
Code: [Select]
// RPG-26 "Aglen" By Rus_Partizan & ORCS Development Studios. ORCS Development Studios' 2004 "Operation Flashpoint : Resistance" Addon Series. All rights reserved.
#define TEast 0
#define TWest 1
#define TGuerrila 2
#define TCivilian 3
#define TSideUnknown 4
#define TEnemy 5
#define TFriendly 6
#define TLogic 7

#define true 1
#define false 0

// type scope
#define private 0
#define protected 1
#define public 2

#define WeaponNoSlot0 // dummy weapons
#define WeaponSlotPrimary1 // primary weapons
#define WeaponSlotSecondary16 // secondary weapons
#define WeaponSlotHandGun2 // HandGun
#define WeaponSlotHandGunItem32 // HandGun magazines
#define WeaponSlotItem256 // items
#define WeaponSlotBinocular4096 // binocular
#define WeaponHardMounted65536

class CfgPatches
{
   class ICP_RPG26
   {
      units[]={""};
      weapons[]={"RPG26","RPG26mag", "RPG26AI","RPG26AImag"};
      requiredVersion=1.750000;
   };
};

class CfgModels
{

   class default {};
   class Weapon: default {};
   class rpg26: Weapon {};
   class rpg26e: Weapon {};


};
class CfgAmmo
{
   class default {};
   class AT3: Default {};
   class LAW : AT3 {};
   class ICPrpg26ammo: LAW
      {
      thrustTime=0.10000000;
      thrust=150;
      maxSpeed=200;
      initTime=0.05;
      hit=800;
      indirectHit=40;
      indirectHitRange=0.500000;
      minRange=20;minRangeProbab=0.50;
      midRange=100;midRangeProbab=0.95;
      maxRange=200;maxRangeProbab=0.05;
      simulation=shotRocket;
      simulationStep=0.05;
      soundHit[]={"\rp_rpg26\sound\ground.wss",db+25,1.0};
                 SoundHitArmor1[]={"\rp_rpg26\sound\arm1.wss",db+25,1};
                 SoundHitArmor2[]={"\rp_rpg26\sound\arm2.wss",db+25,1};
                 SoundHitArmor3[]={"\rp_rpg26\sound\arm3.wss",db+25,1};
                hitArmor[]={soundHitArmor1,0.33, soundHitArmor2,0.33, soundHitArmor3,0.33};
                soundFly[]={"\rp_rpg26\sound\fly.ogg",db+0,1.0};      
   };
   class ICPrpg26AIammo: LAW
      {
      thrustTime=0.10000000;
      thrust=550;
      maxSpeed=750;
      initTime=0.1;
      hit=800;
      indirectHit=40;
      indirectHitRange=0.500000;
      minRange=20;minRangeProbab=0.50;
      midRange=150;midRangeProbab=0.95;
      maxRange=300;maxRangeProbab=0.05;
      simulation=shotRocket;
      simulationStep=0.05;
      soundHit[]={"\rp_rpg26\sound\ground.wss",db+25,1.0};
                 SoundHitArmor1[]={"\rp_rpg26\sound\arm1.wss",db+25,1};
                 SoundHitArmor2[]={"\rp_rpg26\sound\arm2.wss",db+25,1};
                 SoundHitArmor3[]={"\rp_rpg26\sound\arm3.wss",db+25,1};
                hitArmor[]={soundHitArmor1,0.33, soundHitArmor2,0.33, soundHitArmor3,0.33};
                soundFly[]={"\rp_rpg26\sound\fly.ogg",db+0,1.0};      
   };
};

class CfgWeapons
{
   class Default {};
   class LAWLauncher: Default {};
   class RPGLauncher: Default {};
   class RPG26: LAWLauncher
   {
      model="\rp_rpg26\rpg26E";
      modelOptics="\rp_rpg26\optics";
      opticsZoomMin=0.55000;
      opticsZoomMax=0.550000;
      picture="\rp_rpg26\rpg26.paa";
      sound[]={"\rp_rpg26\sound\fire.wss",db18,1.0};                  
      displayName="RPG-26";
      shortNameMagazine="RPG-26";
      magazines[]={"RPG26mag"};
      initSpeed=70;
      canDrop = true;      
   };
   
   class RPG26mag: RPG26
   {
      modelSpecial="\rp_rpg26\rpg26";
      picture="\rp_rpg26\rpg26.paa";
      ammo="icprpg26ammo";
      displayName="RPG-26 'Aglen' ";
      displayNameMagazine="RPG-26";
      magazineType="4 * 256";
      canLock=LockYes;
      canDrop = false;
   };
   class RPG26AI: LAWLauncher
   {
      model="\rp_rpg26\rpg26E";
      modelOptics="\rp_rpg26\optics";
      opticsZoomMin=0.55000;
      opticsZoomMax=0.550000;
      picture="\rp_rpg26\rpg26.paa";
      sound[]={"\rp_rpg26\sound\fire.wss",db18,1.0};                  
      displayName="RPG-26";
      shortNameMagazine="RPG-26 (AI)";
      magazines[]={"RPG26AImag"};
      initSpeed=150;
      canDrop = false;      
   };
   
   class RPG26AImag: RPG26AI
   {
      modelSpecial="\rp_rpg26\rpg26";
      picture="\rp_rpg26\rpg26.paa";
      ammo="icprpg26AIammo";
      displayName="RPG-26 'Aglen'  (AI) ";
      displayNameMagazine="RPG-26 (AI)";
      magazineType="4 * 256";
      canLock=LockYes;
      canDrop = false;
   };
};
class CfgVehicles
{
   class All{};
   class AllVehicles:All{};
   class Land:AllVehicles{};
   class Man:Land{};
   class Soldier:Man{};
   class SoldierEB: Soldier{};
   class SoldierESaboteur: SoldierEB{};

   class rpg26_soldier: SoldierESaboteur
   {
      displayName="AT Soldier (RPG-26)";
      moves="CfgMovesMC";
      scope=public;
      side=0;
      nightVision=1;
      accuracy=5.0;
      sensitivity=3.5;
      sensitivityEar=0.7;
      weapons[]={"ak74","RPG26","binocular","Throw","Put"};
      magazines[]={"AK74","AK74","AK74","AK74","RPG26mag","HandGrenade","HandGrenade"};         
};
   class rpg26_soldierAI: SoldierESaboteur
   {
      displayName="AT Soldier (RPG-26) - AI";
      moves="CfgMovesMC";
      scope=public;
      side=0;
      nightVision=1;
      accuracy=5.0;
      sensitivity=3.5;
      sensitivityEar=0.7;
      weapons[]={"ak74","RPG26AI","binocular","Throw","Put"};
      magazines[]={"AK74","AK74","AK74","AK74","RPG26AImag","HandGrenade","HandGrenade"};         
   };

};   
The propeller is just a big fan in front of the plane used to keep the pilot cool. When it stops, you can actually watch the pilot start sweating.

Offline Pilot

  • Contributing Member
  • **
Re:Minigun magazine
« Reply #13 on: 15 Jan 2005, 01:40:37 »
Uh, this is only a guess, but:

Maybe your weapon has to be defined as a lawlauncher or a grenade launcher?
Code: [Select]
class CfgWeapons
{
   class Default {};
   class LAWLauncher: Default {};
   class Yourweapon: LAWLauncher


Offline Plane

  • Members
  • *
  • You can call me my nickname "Plane"!
Re:Minigun magazine
« Reply #14 on: 15 Jan 2005, 06:35:18 »
if I config my gun to LAWlauncher,it will be on the shoulder then.

Then I config weapon to "weapontype=1+16;" and magazine to "magazinetype= 4 * WeaponSlotItem;" will cause it crash again.

So I think its "class Default{};" problem, so is anyone know much about "Parents-child-relation" on weapon type, please help me! ;)
The propeller is just a big fan in front of the plane used to keep the pilot cool. When it stops, you can actually watch the pilot start sweating.