Data Realms Fan Forums
http://45.55.195.193/

Non-Lua weapon animation (While held)
http://45.55.195.193/viewtopic.php?f=1&t=17554
Page 1 of 1

Author:  MaximDude [ Sun Jan 10, 2010 11:26 pm ]
Post subject:  Non-Lua weapon animation (While held)

Now, I don't know if this is something that everyone knows or not, because I did some searching and I didn't come up with anything actually related to animating weapons while they are held (Nor did I see animated weapons with working animations when held tbh), so here we go.

While making a new MDC weapon today I somehow (For unknown reason) figured out a way to animate weapons while they are held (Or not) without lua and/or whatever other ways there are (Seeing as SpriteAnimMode = 1 on held weapons doesn't work and all) - The trick is to use attachments to do the animation (Without them interfering with the weapon's default animation (Weapon000, Weapon001, etc.).

I was going to make a detailed tutorial on how to do this, but then I realized it is simpler for whoever needs this to just look at the thing and figure it out in 30 seconds then for me to spend an hour writing a goddamn tutorial.

I am attaching a weapon that has 3 different animations running so you can check the extremely simple method and use it for your own guns/tools/nades/other held devices.

Here are some gifs of how it works (The thing is supersized for 'ease of view', why? I don't know, I just felt like making it huge.)
Image

Image
Turning left/right does not displace animation.

Notes:
Frame rates even out (It takes about the same time for a 3 frame animation and a 10 frame animation to complete a cycle) - You can see it in the gifs.
And uhhh.... If the weapon is destroyed there might be animations flying around until they settle... >_______>'

Here is the .rte
Attachment:
Animated Weapon.rar [20.85 KiB]
Downloaded 128 times

PS. This probably works on magazines too (If mags can have attachables that is), but I didn't check, so feel free.

Author:  numgun [ Mon Jan 11, 2010 11:50 am ]
Post subject:  Re: Non-Lua weapon animation (While held)

Otherwise cool, but when the gun is blown up, the animated parts should die instantly so you wont leave animating crap lying around. Or atleast get it killed fast with GIL = 0.01 and Autogenerate = 0.

Author:  MaximDude [ Mon Jan 11, 2010 12:47 pm ]
Post subject:  Re: Non-Lua weapon animation (While held)

numgun wrote:
Otherwise cool, but when the gun is blown up, the animated parts should die instantly so you wont leave animating crap lying around. Or atleast get it killed fast with GIL = 0.01 and Autogenerate = 0.


Yeah, that's the only issue this method has, but it's fixable.
Although, the animations that survive the gun's gibbing aren't very noticeable if they aren't supersized.

Page 1 of 1 All times are UTC [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/