Home   Help Search Login Register  

Author Topic: Weapons with animations  (Read 6779 times)

0 Members and 1 Guest are viewing this topic.

Offline Aldo15

  • OFP-addict
  • Former Staff
  • ****
    • My OFP missions
Re: Weapons with animations
« Reply #15 on: 23 Feb 2011, 23:43:03 »
I'll Try to do it, then I write again...
about custom optics, Do I need some image?

Regards,
Aldo
My OFP stuff
FMF Project by Aldo15. Coming soon.
If in the high school or university, Teachers add a new subject about how to make scripts, missions, for ofp. I'd be number one of my classroom

Offline Lenyoga

  • Professor of Misanthropology
  • Members
  • *
Re: Weapons with animations
« Reply #16 on: 24 Feb 2011, 00:00:22 »
Custom optics also need a model with a texture; I'll try to find a tutorial or a example somewhere...

EDIT: You need to put 'modelOptics = "pathofmodelforoptics.p3d"' into your config.cpp and you also need a p3d with a texture. I do not really remember how the p3d looks, but I think it was a 1x1m square.

EDIT2: I finally, after going through all my old archives, found a optics.p3d - it's not 1x1, it's much smaller - and I used a 512x512 texture (so 128x128, 256x256, etc will work on it). Originally I made it for a TIE fighter, but it'll work with a weapon, too - I don't know how to upload it here, so I'll email you.
« Last Edit: 24 Feb 2011, 00:27:39 by Lenyoga »
As a grandmother I've got lots of gold.

Offline Aldo15

  • OFP-addict
  • Former Staff
  • ****
    • My OFP missions
Re: Weapons with animations
« Reply #17 on: 24 Feb 2011, 01:13:28 »
How I can to add this weapon to west unit?
My OFP stuff
FMF Project by Aldo15. Coming soon.
If in the high school or university, Teachers add a new subject about how to make scripts, missions, for ofp. I'd be number one of my classroom

Offline Lenyoga

  • Professor of Misanthropology
  • Members
  • *
Re: Weapons with animations
« Reply #18 on: 24 Feb 2011, 01:46:48 »
Just put this into your cpp:


Code: [Select]
class CfgVehicles
{

   class All {};
   class AllVehicles: All {};
   class Land: AllVehicles {};
   class man: Land {};
   class Soldier: man {};
   class SoldierWB: Soldier {};

   class Aldo_SoldierWB_GunName: SoldierWB
   {
     displayname="Soldier (GunName)";
vehicleclass="Men";               //or a custom class
     Weapons[]={"NameOfGun"};
     magazines[]={"throw","NameOfGun_Mag","NameOfGun_Mag","NameOfGun_Mag","NameOfGun_Mag","NameOfGun_Mag",};

  };

};
As a grandmother I've got lots of gold.

Offline Aldo15

  • OFP-addict
  • Former Staff
  • ****
    • My OFP missions
Re: Weapons with animations
« Reply #19 on: 24 Feb 2011, 01:53:21 »
Ive written that, but I don't find the unit...  :dunno:
My OFP stuff
FMF Project by Aldo15. Coming soon.
If in the high school or university, Teachers add a new subject about how to make scripts, missions, for ofp. I'd be number one of my classroom

Offline Lenyoga

  • Professor of Misanthropology
  • Members
  • *
Re: Weapons with animations
« Reply #20 on: 24 Feb 2011, 01:56:42 »
Interesting. Was there any error message? It should be under West-Men somewhere. Maybe its the "," at the ender after the last magazine - I made some typing error.
As a grandmother I've got lots of gold.

Offline Aldo15

  • OFP-addict
  • Former Staff
  • ****
    • My OFP missions
Re: Weapons with animations
« Reply #21 on: 24 Feb 2011, 02:36:09 »
Ive found the unit....  :D

Well, I'll write some problems:

1. Menu --------> No entry 'config.bin/CfgWeapons/M4A1/Auto.ffCount'.
2. The weapon has not textures....
3. The weapon get without the magazine....
4. to shoot ------> No entry 'config.bin/CfgRecoils.'.
5. M4 burst has not sound !!!
6. the sight has textures  :good:
7. M4 single has sound
8 to reload the weapon appears Magazine (has sound)

I'll upload the file, please review

Regards,
Aldo
My OFP stuff
FMF Project by Aldo15. Coming soon.
If in the high school or university, Teachers add a new subject about how to make scripts, missions, for ofp. I'd be number one of my classroom

Walter_E_Kurtz

  • Guest
Re: Weapons with animations
« Reply #22 on: 24 Feb 2011, 14:00:53 »
2. No Textures
You need a texture path swap utility to change the paths of the textures from 'INQ_CONST' (i think..) to you addon folder-path. The dowload for the texture path swap utility is here:
Utility is attached to this post, temporarily. (Texture Path Swap at OFP.info). The addon path you are using is currently M4.


1. & 4. Auto.ffcount & CfgRecoils
You need some extra info in your config. I suggest you base it on the BIS M4 (quoted below)


3. & 8. Without magazine / reload appears magazine
Your model & modelSpecial are the wrong way round:
   model = sin magazine  (m4sm)
   modelSpecial = con magazine  (m4cm)

You should probably also include M4sm in the CfgModels section.


5. No burst sound
Because there is no such sound as "m4.disp.wav".

Are you sure those are the firing modes you want to have: single and three-round burst?


Quote from: BIS M4 config
   class M4:Riffle
      {
      scopeWeapon=2;
      scopeMagazine=2;
      model="XM-177E2_proxy";
      modelOptics="optika_m16";
      optics=1;
      opticsZoomMin=0.35;
      opticsZoomMax=0.35;
      valueWeapon=2;
      valueMagazine=2;
      displayName="$STR_DN_M4";
      displayNameMagazine="$STR_MN_M4";
      shortNameMagazine="$STR_SN_M4";
      drySound[]={"weapons\M16Dry",0.0031623,1};
      magazines[]={"M4","Mortar"};
      modes[]={"Single","FullAuto"};

      class Single
         {
         ammo="BulletSingleW";
         multiplier=1;
         burst=1;
         displayName="$STR_DN_M4";
         dispersion=0.002;
         sound[]={"Weapons\M16Single",1.0,1};
         soundContinuous=0;
         reloadTime=0.07;
         ffCount=1;
         recoil="riffleSingle";
         autoFire=0;
         aiRateOfFire=5.0;
         aiRateOfFireDistance=500;
         useAction=0;
         useActionTitle="";
         };

      class FullAuto
         {
         ammo="BulletFullAutoW";
         multiplier=1;
         burst=1;
         displayName="$STR_DN_M4_AUTO";
         dispersion=0.004;
         sound[]={"Weapons\M16Single",1.0,1};
         soundContinuous=0;
         reloadTime=0.1;
         ffCount=30;
         recoil="riffleBurst3";
         autoFire=1;
         aiRateOfFire=5.0;
         aiRateOfFireDistance=500;
         useAction=0;
         useActionTitle="";
         };
      };
« Last Edit: 26 Feb 2011, 00:47:19 by Walter_E_Kurtz »

Offline Lenyoga

  • Professor of Misanthropology
  • Members
  • *
Re: Weapons with animations
« Reply #23 on: 24 Feb 2011, 14:43:40 »
Okay, I went through the cpp and edited it a bit (Ironically, most of the errors were those I made above...). I also added you ALD15_ tag and changed the texture paths.
All thats missing is a burst fire sound and a muzzle flash.

I'll look for a cpp tutorial - I know I had one some time ago, but I can't find it.
And if you don't know something in english - just try in spanish, I speak a little bit.


EDIT: I found a old zip file with commented config files on my old hard drive! Very useful!
EDIT2: Walter showed me a link: http://www.ofpec.com/forum/index.php?topic=35538.msg244000#msg244000
« Last Edit: 26 Feb 2011, 01:56:26 by Lenyoga »
As a grandmother I've got lots of gold.

Offline Aldo15

  • OFP-addict
  • Former Staff
  • ****
    • My OFP missions
Re: Weapons with animations
« Reply #24 on: 24 Feb 2011, 19:20:14 »
Thanks you very much!!!

@Lenyoga

How did you add the textures?

@Walter_E_Kurtz

I have problems downloading TxtPathSwap.rar

I'd like to Know if Is there another program to make addons different to O2? or tell me How I can to add textures to addons...?

The M4 weapon is wonderfull! It would have been better if the magazine is removed when I reload it, because is removed when there aren't bullets... Do you understand me?
My OFP stuff
FMF Project by Aldo15. Coming soon.
If in the high school or university, Teachers add a new subject about how to make scripts, missions, for ofp. I'd be number one of my classroom

Offline Lenyoga

  • Professor of Misanthropology
  • Members
  • *
Re: Weapons with animations
« Reply #25 on: 24 Feb 2011, 20:29:11 »
I just found out I cannot upload exe's... But Walters .rar should work (it gave me an error message first, but the exe worked)

You need the program to change the texture paths to you addon folder (that's what I did)

And I think it's not possible to change the gun model while reloading a partially full magazine... except you make a special soldier p3d with a special gun p3d with a special reloading animation... But this unit wouldn't be able to use other guns correctly and other units wouldn't be able to use this gun correctly - would be a purely cinematic effect.
As a grandmother I've got lots of gold.

Offline Aldo15

  • OFP-addict
  • Former Staff
  • ****
    • My OFP missions
Re: Weapons with animations
« Reply #26 on: 24 Feb 2011, 21:15:29 »
I understand perfectly!

I'll try to make more weapons with these animations, but I'll try to take others weapons as template.
for example : Laser's US weapons, because if I try to make weapons from scratch, I wouldn't be able to make them, because my O2 doesn't load the textures!

Do you speak spanish?  Is it okay if I write in Spanish?

Regards,
Aldo
My OFP stuff
FMF Project by Aldo15. Coming soon.
If in the high school or university, Teachers add a new subject about how to make scripts, missions, for ofp. I'd be number one of my classroom

Offline Lenyoga

  • Professor of Misanthropology
  • Members
  • *
Re: Weapons with animations
« Reply #27 on: 25 Feb 2011, 00:23:19 »
Yeah, okay, pero probar a usar espanol facil, yo hablo solo un poco.

Yo penso que existan modelos ... ahem... sample models for todos tipos de armas. Voy a look them up.

EDIT: Found it: ftp://downloads.bistudio.com/Tools/BIModels.zip
« Last Edit: 25 Feb 2011, 00:27:34 by Lenyoga »
As a grandmother I've got lots of gold.

Offline Aldo15

  • OFP-addict
  • Former Staff
  • ****
    • My OFP missions
Re: Weapons with animations
« Reply #28 on: 25 Feb 2011, 02:56:39 »
« Last Edit: 27 Feb 2011, 15:53:02 by Aldo15 »
My OFP stuff
FMF Project by Aldo15. Coming soon.
If in the high school or university, Teachers add a new subject about how to make scripts, missions, for ofp. I'd be number one of my classroom

Offline Lenyoga

  • Professor of Misanthropology
  • Members
  • *
Re: Weapons with animations
« Reply #29 on: 25 Feb 2011, 03:29:07 »
Oops, soy demasiado estupido to upload a working link; http://www.flashpoint1985.com/cgi-bin/ikonboard311/ikonboard.cgi?act=ST;f=61;t=67070 that's a link to the forum where I found it, the download there worked for me.

EDIT: Okay, forget the link - it's for ARMA, the BIS link is broken...

EDIT2: You can always count on the Russians! Working link: http://www.flashpoint.ru/data/files/utilities/
« Last Edit: 25 Feb 2011, 20:00:40 by Lenyoga »
As a grandmother I've got lots of gold.