Home   Help Search Login Register  

Author Topic: Animated Weapon Parts  (Read 8008 times)

0 Members and 2 Guests are viewing this topic.

WAKA-WAKA

  • Guest
Re:Animated Weapon Parts
« Reply #30 on: 07 May 2005, 16:42:58 »
oh lol, i thought afaik was some kind of ofp term. ..
well my config is huge because its a large weapon pack but heres the m79 part.
class sebm79he: grenadelauncher
   {
      cursor="t_select.paa";
      scopeMagazine=2;
      weaponType=0;
      magazineType="256";
      ammo="sebgren";
      picture="\vweap\m79\m_grenadew.paa";
      displayName="40MM HE Grenade";
      displayNameMagazine="40MM HE";
      shortNameMagazine="40HE";
      count=1;
      reloadTime=0;
      sound[]={"Weapons\grenade_launch",0.000316,1};
      initSpeed=85;
      canLock=0;
      autoReload=0;
      ffMagnitude=0.100000;
      ffFrequency=1;
      ffCount=1;
      recoil="Empty";
      dispersion=0.015;
      aiDispersionCoefY=2.000000;
      maxLeadSpeed=15;
      optics=0;
      muzzlePos="usti granatometu";
      muzzleEnd="konec granatometu";
      canDrop = true;
   };

   class M16GrenadeLauncher : Riffle {};
   class sebm79:M16GrenadeLauncher
   {
      scopeWeapon=2;
      scopemagazine=o
      weaponType=1;
      valueWeapon=2;
      valueMagazine=2;
      displayName="M79 GrenadeLauncher";
      picture="\vweap\m79\w_m79.paa";
      modelspecial = "\vweap\m79\m79";
      model="\vweap\M79\M79empty";      
      uiPicture="\vweap\m79\igrenadier";
      
      muzzles[]={"sebM79Muzzle"};
      class sebM79Muzzle: GrenadeLauncher
      {
         displayName="M-79 Grenade Launcher";
         modelOptics="\vweap\m79\seboptika_m79";
         optics = 1;
         opticsZoomMin=0.35;
         opticsZoomMax=0.35;
         magazines[]={"sebm79he","sebm79buck","sebm79HEammobag","Flare", "FlareGreen", "FlareRed", "FlareYellow"};
         reloadMagazineSound[]={"\vweap\m79\sebGrenadereloade.wav",0.05,1};
         
      };
      canDrop=1;
   };


I also have both the m79 and m79empty listed in the config models section. but in game the gun always looks like its empty?

and yes i know this is the seb config and i do intend to ask permission before i think of any release :)

Kyle Sarnik

  • Guest
Re:Animated Weapon Parts
« Reply #31 on: 07 May 2005, 18:09:28 »
You should at least change the classnames  ;).

As for zlash, you actualy CAN make realistic anims with it, cause not only can you make objects flash on, but I also found that you can make them disappear when fired (like a closed slide position)...

Offline Planck

  • Honoured
  • Former Staff
  • ****
  • I'm never wrong ....I'm just not always right !
Re:Animated Weapon Parts
« Reply #32 on: 07 May 2005, 18:11:45 »
Looking at the entries for the grenadelauncher in the game config:

Code: [Select]
class GrenadeLauncher:Default
   {
      cursor="t_select.paa";
      scopeMagazine=2;
      valueWeapon=3;
      valueMagazine=2;
      weaponType=0;
      magazineType="2 *       256";
      ammo="Grenade";
      displayName="$STR_DN_GRENADE";
      displayNameMagazine="$STR_MN_GRENADE";
      shortNameMagazine="$STR_SN_GRENADE";
      count=1;
      reloadTime=0;
      sound[]={"Weapons\grenade_launch",0.0003162,1};
      reloadSound[]={"Weapons\M16load",0.0003162,1};
      initSpeed=60;
      canLock=0;
      autoReload=0;
      ffMagnitude=0.1;
      ffFrequency=1;
      ffCount=1;
      recoil="Empty";
      dispersion=0.015;
      aiDispersionCoefY=2.0;
      maxLeadSpeed=15;
      optics=0;
      muzzlePos="usti granatometu";
      muzzleEnd="konec granatometu";
      uiPicture="igrenadier";
   };


Here is the config portion for the M16grenadelauncher:

Code: [Select]
class M16GrenadeLauncher
   {
      scopeWeapon=2;
      scopeMagazine=0;
      weaponType=1;
      valueWeapon=2;
      valueMagazine=2;
      displayName="$STR_DN_M16_GRENADE";
      model="m16_granatomet_proxy";
      picture="";
      uiPicture="igrenadier";
      muzzles[]={"M16Muzzle","M203Muzzle"};
      canDrop=1;

      class M16Muzzle:M16
      {
         magazines[]={"M16"};
      };

      class M203Muzzle:GrenadeLauncher
      {
         displayName="$STR_DN_M203";
         sound[]={"weapons\M16GrenadeLaunch",0.0003162,1};
         magazines[]={"GrenadeLauncher","Flare","FlareGreen","FlareRed","FlareYellow"};
      };
   };

As you can see it doesn't inherit from Riffle.

Btw.....your line:

scopemagazine=o

Should maybe read:

scopemagazine=0

Also those BIS configs for the grenadelaunchers don't have a modelSpecial entry.

The only modelSpecial entry (apart from class Default in cfgWeapons) in the whole of the game config is here:

Code: [Select]
class Mortar:GrenadeLauncher
      {
      scopeWeapon=0;
      scopeMagazine=2;
      modelSpecial="m16_mortar_proxy";
      valueMagazine=5;
      magazineType="2 *       256";
      ammo="MortarShell";
      displayName="$STR_DN_MORTAR_W";
      displayNameMagazine="$STR_MN_MORTAR_W";
      shortNameMagazine="$STR_SN_MORTAR_W";
      count=1;
      initSpeed=70;
      reloadAction=manactreloadmortar;
      modes[]={"this","this"};
      };


Hope this helps a tiny bit.


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

WAKA-WAKA

  • Guest
Re:Animated Weapon Parts
« Reply #33 on: 07 May 2005, 22:37:56 »
thanks plank i will try it.
yea kyle sarnik i see you have some vietnam weapons coming out with animated weapon parts. that is pretty sweet how do you do it? or is it top secret right now ;).   BTw i didnt change classnames because i might reease it a replacement for the sebnam_wp if they let me because their guns look a little outdated.

WAKA-WAKA

  • Guest
Re:Animated Weapon Parts
« Reply #34 on: 07 May 2005, 22:45:12 »
sarnik, can you adjust the times of how long a chamber is open for the animated wepaon parts? otherwise it would be uselss for an m79 because the barrel would open and close real quick.

also does anyone know what it means when it wont open an object in the editor because it says unsupported version? i cant figure it out

Kyle Sarnik

  • Guest
Re:Animated Weapon Parts
« Reply #35 on: 07 May 2005, 23:54:30 »
sarnik, can you adjust the times of how long a chamber is open for the animated wepaon parts? otherwise it would be uselss for an m79 because the barrel would open and close real quick.

also does anyone know what it means when it wont open an object in the editor because it says unsupported version? i cant figure it out

One solution, two ways of doing it:
Modelspecial, use the model special to make it closed when its loaded, and empty when its not loaded. If its a single round magazine, your golden.

If it is an ammo bag type mag, you need to create a script run off a fired EH that will detect if you fired the M79, and then if so use selectweapon <otherweapon>, then a delay, then selectweapon "M79", <otherweapon> being a weapon you add before the selectweapon command, and remove after the selectweapon "M79", <otherweapon> needs to be like a fake weapon that you should config that is based of... say.. the "put" weapon, and accepts no mags and is not hidden when empty (hideemtpy=0; or something I forgot the config line for that, look in the commented config for it). That should do it....

WAKA-WAKA

  • Guest
Re:Animated Weapon Parts
« Reply #36 on: 08 May 2005, 00:04:07 »
oooh sounds good....lol but im not good enough for that really. luckily i am "golden" at the moment because im using just a grenade (single shot). but the modelspecial still doesnt work and i dont see why. look at the config i posted a little earlier, do u have any suggestions?

thanks

DanAK47

  • Guest
Re:Animated Weapon Parts
« Reply #37 on: 13 May 2005, 22:41:16 »
You can reveal what is underneath an object on your model by creating a shell around that particular object, applying a near-transparent texture to it, placing it in the zasleh selection, and using face order to ensure that the object that is to be hidden is rendered after the "shell".

This creates something like the "window bug" in vehicles and hides the object you want to disappear (e.g. a rifle's bolt, or a pistol's slide). This is how I animated my M14s.