Home   Help Search Login Register  

Author Topic: Animated Weapon Parts  (Read 7334 times)

0 Members and 2 Guests are viewing this topic.

Homefry31464

  • Guest
Animated Weapon Parts
« on: 12 Sep 2004, 23:45:44 »
We have some nice looking weapons out... some of which can't really be improved... What I do think would be nice, however, is animated weapon parts.  I've seen it done a few times, such as the HEP M1911 has an animated slide.  I was curious if anyone knows how to go about doing this?

-Homefry

bootneckofficer

  • Guest
Re:Animated Weapon Parts
« Reply #1 on: 28 Sep 2004, 23:09:27 »
yer working parts on weapons would make things even more realistic!!!  :)
i haven't got a clue how to do it but someone who does should seriously think about it

bootneckofficer

Offline remcen

  • Contributing Member
  • **
  • a.k.a. hottentotten_mike
    • IM:UC
Re:Animated Weapon Parts
« Reply #2 on: 29 Sep 2004, 22:35:18 »
add a second slide in the backward position to your model and make it part of  the zasleh-selection. that will  make it appear in this position whenever the weapon is fired. however the slide in its forward position will be still visible.

you can also use the weaponspecial option for parts of a weapon that you want to fly away: make two separate models of your weapon, the first in loaded condition, the second one in fired condition. this was used for the rifle mortars of BIS (hint: look what happens when you load a riflemortar to a m4! ok i make it short: an m16 appears with a mortar on its muzzle) and also kegetys used this for his rpgs.  in the config you add model="loadedmodelname.p3d" and modelspecial="firedmodelname.p3d"

BUT: AFAIK real animations which you can see moving and which are scripted in the config are not possible for non-static weapon as rifles, pistols, rocketlaunchers, etc.
 
we're looking for members: IM:UC MOD

rOk

  • Guest
Re:Animated Weapon Parts
« Reply #3 on: 30 Sep 2004, 11:46:01 »
Those new Chinese units from PAS have a working gun slide...but I don't know which method they took to accomplish this.

HerrFlick

  • Guest
Re:Animated Weapon Parts
« Reply #4 on: 07 Oct 2004, 17:09:53 »
Isn't it possible to add a eventhandler in the config file that starts a animation when the gun is fired?

DBR_ONIX

  • Guest
Re:Animated Weapon Parts
« Reply #5 on: 07 Oct 2004, 18:39:18 »
I once try out an idea I am sure will work..
On the M249 (Or M60 etc), the belt is still visable even when the mag is empty..
So, make a selection out of each shell, numbder 1 to 15ish (Only visable ones)

Then a script thats activated on fired that checks if the weapon has been fired, and how many times, if magsize = 15, setobjexttexture the shell transparent..

There's a few things that could go wrong, like if reload (Easly fixed with a reloaded EH), and change weapon (Just check the type of shell fired)
But I lost the files after a HD format  :-\

Oh, the C-47's pilots (WW2EC), the pistol, has a topslide that stayed back when you were outta ammo or fired.. Only prob if you changed to 'nades, the slide went back too..
But it's impressive non the less ;)
- Ben
BTW, oh, there is a mod, some urban combat one, is working on very realistic weapons etc, all animated.. Not heard much apart from a single post on this forum

Offline remcen

  • Contributing Member
  • **
  • a.k.a. hottentotten_mike
    • IM:UC
Re:Animated Weapon Parts
« Reply #6 on: 08 Oct 2004, 01:35:54 »
@ DBR_ONIX: are you sure that eventhandlers work for weapons??? i am not.  ???     i tried hiddenselection to which you were refering in your post and it didn't work either. but perhaps i was simply not experienced enough when i tried  ;)

concerning the slide: certainly done via the modelspecial "trick": you shoot with the weapon's first model and when the magazine is empty the model is changed to that which is defined in the modelspecial=""; -passage of the config.cpp

in my first post  i forgot one real animation: the heavy grenade launchers (forgot the names) which came with resistance have an animated drum. could be useful for people making revolvers.
we're looking for members: IM:UC MOD

DBR_ONIX

  • Guest
Re:Animated Weapon Parts
« Reply #7 on: 08 Oct 2004, 13:31:51 »
Yeah, in the config.cpp
revolving="selectionname"
axis="selection name of points in memory lod"

As for EH with weapons, yeah, it works
Add to the operator (The unit holding it :P), a fired eventhandler..
I'm not sure the name of the weapon tho :'(

It IS possible tho :P
- Ben

DBR_ONIX

  • Guest
Re:Animated Weapon Parts
« Reply #8 on: 12 Oct 2004, 14:57:14 »
Hmm, after thinking about this, setobjecttexture on a weapon would be hard/impossible  :-\
Because you don't know the name of the weapon
Oh well :(
- Ben

HerrFlick

  • Guest
Re:Animated Weapon Parts
« Reply #9 on: 13 Oct 2004, 00:05:23 »
This really stinks, I hope OFP 2 will be lightyears ahead of this config crap...

I tried the eventhandler, doesn't work.

class Animations, foggedaboudit >:(

I am now stuck with a minigun that doesn't rotate, I guess my only option is the modelspecial trick... ::)

Offline oyman

  • Members
  • *
  • king of pings
Re:Animated Weapon Parts
« Reply #10 on: 13 Oct 2004, 01:13:32 »
I am now stuck with a minigun that doesn't rotate, I guess my only option is the modelspecial trick... ::)

theres a way to get the barrels spining on a minigun

Offline remcen

  • Contributing Member
  • **
  • a.k.a. hottentotten_mike
    • IM:UC
Re:Animated Weapon Parts
« Reply #11 on: 13 Oct 2004, 23:51:48 »
if its a static weapon or part of a vehicle, name the rotating part  gatling,
the drum of the heavy grenade launchers is called buben, so that might work for animated barrels of portable weapons.  but as minigun barrels are rotating real fast, this grenadelauncher kind of rotation could be a bit slow. haven't tried it yet tho.
we're looking for members: IM:UC MOD

Offline oyman

  • Members
  • *
  • king of pings
Re:Animated Weapon Parts
« Reply #12 on: 14 Oct 2004, 05:13:38 »
if its a static weapon or part of a vehicle, name the rotating part  gatling,
the drum of the heavy grenade launchers is called buben, so that might work for animated barrels of portable weapons.  but as minigun barrels are rotating real fast, this grenadelauncher kind of rotation could be a bit slow. haven't tried it yet tho.


i think the speed at which the barrels move is determined by the reload time

DBR_ONIX

  • Guest
Re:Animated Weapon Parts
« Reply #13 on: 15 Oct 2004, 15:20:30 »
BAS, Bunker Pak 5 both have something with a rotating minigun in it (BAS on a chopper tho)
Download bunker pack 5 and de-pbo minigun.pbo and open the model
;)
- Ben

Lean Bear

  • Guest
Re:Animated Weapon Parts
« Reply #14 on: 20 Oct 2004, 19:54:58 »
But these are for fixed weapons, right?

You could go through the timely process of making a new gun, with say the slide and mag as different hidden selections. Then, write a simple scirpt to have the hidden selections shown etc. this way, you could make the slide move back when fired etc. and another script to check when you are out of ammo to make the slid stay in the same place (the rear, locked).

About animating the different weapons parts, the only thing I can think of off the top of my head is to make the weapon as another class eg. a man. So you could have the different parts named so they can be animated. Then, in (I use) OFPAnim, don't load pivots and linking, animate the gun how you want, the mag coming out etc. then save the anims. Write it all up in a config like normal. The only problem is: (it would count as a unit, and there's a max no. of units you can place in an OFP mission. Also, the fact that the anims wouldn't link to what the player is doing. Unless you kept trying and eventually matched them perfectly.