Home   Help Search Login Register  

Author Topic: Weapons firing multiple ammo types.  (Read 1989 times)

0 Members and 1 Guest are viewing this topic.

Baphomet

  • Guest
Weapons firing multiple ammo types.
« on: 05 Oct 2002, 16:42:39 »


     I've been looking at the cpp file for the kozlice and I was wondering if there are any tutorials for creating a weapon with multiple ammo types which have different effects when fired. I have a general idea of what is involved however I'd like to find out what in particular is required to create something like that. Any ideas?

Eviscerator

  • Guest
Re:Weapons firing multiple ammo types.
« Reply #1 on: 05 Oct 2002, 16:47:41 »
www.flashpoint1985.com/breathe

grab the commented config, all your answers are in there

Baphomet

  • Guest
Re:Weapons firing multiple ammo types.
« Reply #2 on: 05 Oct 2002, 17:24:45 »
Its perhaps not as well commented as I would have thought. In fact in sofar as the cfgweapons.hpp the comments are very sparse. I'm still pretty much the same place I was when I was sitting in front of my monitor, eyes glazed over trying to figure out what components of the code for the Kozlice are necessary for the mulitple ammo types and firing modes.


So, I have to define the perameters for the alternate firing mode, just like the default one. Dispersion, reloadtime. Magazine reloadtime...etc. ... How in the cfgweapons portion do I declare that there are other firing modes? (anything to do with that "muzzles[] = {blahblah, blah};" thing?). The general concept I seem to understand. Its the smaller more subtle bits that holds it all together in a cohesive chunk of code that throws me off.
« Last Edit: 05 Oct 2002, 17:34:00 by Baphomet »

1B1KSniper

  • Guest
Re:Weapons firing multiple ammo types.
« Reply #3 on: 05 Oct 2002, 20:16:49 »
Look up the grenade launcher in the cfgWeapons commented config.
You just need to put in the magazines part all the magazines for the ammo types i.e.:
magazines[] = {GrenadeLauncher, Flare, FlareGreen, FlareRed, FlareYellow};

Baphomet

  • Guest
Re:Weapons firing multiple ammo types.
« Reply #4 on: 06 Oct 2002, 05:41:14 »
 


     Okay, perhaps I'm in over my head. I need to gain an understanding from the ground up. Since one of the fundamental basics of a multi fire weapon is varied types of ammunition. Perhaps a better understanding of that CfgAmmo does will help.

What exactly is this doing? It would seem that in CfgAmmo area that you're declaring various types of ammo. However what is all the "BulletSingle" "Bulletburst: Bulletsingle" stuff mean?


   class KozliceBall : BulletSingle {};
   
   class BulletBurst: BulletSingle {};
   
   class KozliceShell : BulletBurst

captain caffeine

  • Guest
Re:Weapons firing multiple ammo types.
« Reply #5 on: 06 Oct 2002, 06:32:25 »
  Someone correct me if I'm wrong but the Kolzice or howewver you spell it, is just firing 7 rounds at such a high rate of speed it appears and sounds as if only round is being fired, since in the cpp files it shows   count =7;  and burst=7;
 the reload time being 0.05 all 7 rounds are being discharged
from the magazine ,  sound continuous=false    so the weapon sounds  like only 1 round is being fired as opposed to seven.   Now the multipliers and division I havent a clue about
and need some explanation,  and the dispersion makes the projectiles from the weapon spread out to a certain extent.

  Your question is understood here and I believe that to make a weapon fire several different kinds of ammo is possible such as a 50 cal with non explosive  AP tips, and Explosive tips just takes some workin, lotsa caffiene and some patience. Just holler bout what you're trying to make and ill see if I cant lend a hand, I'm no expert but most of the cpp files just take getting used to.

Baphomet

  • Guest
Re:Weapons firing multiple ammo types.
« Reply #6 on: 06 Oct 2002, 07:07:04 »
 

     Yeah. I'm farmilar with the way they "emulate" a shotgun by reducing the reload time in a burst to make it appear like its firing a huge barrage of projectiles at once. Actually thats kind of what I'm trying to do. Make a shotgun that just fires a diverse range of ammunition, with respective firing modes for each ammo type. The only thing is. I'm not using the Kozlice code for it. I don't really like the Kozlice so much. I'm using someone's Spas12 model and I'm just making my own personal gun to mess around with so I can achieve a better understanding of how to do these things (and of course to play around with it).

     Its things like this that confuse me.


muzzles[] = {KozliceBallMuzzle, KozliceShellMuzzle};
      class KozliceBallMuzzle : KozliceBall
      {
         magazines[] = {KozliceBall};
      };
      class KozliceShellMuzzle : KozliceShell
      {
         magazines[] = {KozliceShell};
      }

This was listed under Class Kozlice. Thing is. Unlike weapons that have various firing modes. I'm of the understanding that this is part of what makes it possible to press the space bar and change from "Kozlice ball" to "Kozlice shell" They are like separate weapons that simply work under one. They each have their own types of magazines.

Its just confusing thats all... I have gleaned little bits of understanding here and there. Still not yet enough to create something whole and complete. Its somewhat annoying.


Baphomet

  • Guest
Re:Weapons firing multiple ammo types.
« Reply #7 on: 06 Oct 2002, 08:26:21 »



     I think I know what it is now. I'm going to have to do all this over. I've noticed there are some inconsistancies that seem to prohibit the creation of this. It has attributes for firing modes for the only mode thats available right now. Along with things like specifying magazinetypes and whatnot. This won't seem work since with the kozlice. It has three elements I've picked out. The Kozlice ball section. The Kozliceshell section, then one called Class Kozlice. Which has the general info including the muzzles that fire the two types of ammo. Including respective magazine types. I don't know how to modify this code to look like the Kozlice one without starting from scratch. Rar.

Baphomet

  • Guest
Re:Weapons firing multiple ammo types.
« Reply #8 on: 06 Oct 2002, 10:29:11 »

Okay, looks like I didn't need to start over after all. Taking a risk and using some intuition I have made a gun that fires a shotgun like round and a solid slug. However now I do have a problem that I can't seem to figure out. When I shoot the solid slug. It makes many bullet puffs on the ground, yet the burst is set to '1'. I'd prefer that it didn't. Can anyone tell me why so I can fix it?



Furthermore could anyone tell me what ffcount means?

captain caffeine

  • Guest
Re:Weapons firing multiple ammo types.
« Reply #9 on: 06 Oct 2002, 18:48:02 »
Bout the only thing I can think of is   burst=0    , making it only fire one slug, and nothing but one slug, same as rifle single shot

Offline SelectThis

  • Former Staff
  • ****
  • .
Re:Weapons firing multiple ammo types.
« Reply #10 on: 06 Oct 2002, 18:53:11 »
There are three parts of the cpp that define a weapon.

ammo
magazine
weapon

To make a weapon use different types of ammo (eg bulletsingle) then use muzzles in the weapon defn.

To make a weapon fire the same ammo in different ways (eg single, burst, fullauto) then use modes.

Hope that helps

SelectThis