Data Realms Fan Forums

MuzzleOffset changing
Page 1 of 1

Author:  Hoovytaurus [ Mon Jun 06, 2016 9:16 am ]
Post subject:  MuzzleOffset changing

I've got a gun which has two barrels, and while the script to change ammo is easy to find (pretty sure there are even vanilla weapons that use one), I have no idea how to change a weapon's muzzleoffset in game, on-the-go.

What's the simplest way to achieve this? I'm looking to be able to just switch the barrels the gun is using with a simple pie menu option, along with the magazine it uses (which also means ammo).

EDIT: I've also realized one thing - since the two barrels are totally different things weapons, is it possible to have one barrel use one magazine sprite and another one use another?

Author:  p3lb0x [ Mon Jun 06, 2016 10:23 pm ]
Post subject:  Re: MuzzleOffset changing

I am not sure about the other stuff (It's been a long time since I've modded CC). But having the gun fire from different barrels shouldn't be too hard. Just fire a dummy particle with similar properties to the fired projectile (So that the AI can figure out how to use it) and use lua to actually fire it. That way you can put the offset wherever you want.

Author:  Hoovytaurus [ Tue Jun 07, 2016 4:02 am ]
Post subject:  Re: MuzzleOffset changing

Was afraid I'd have to delve into Lua. Guess I'll just have to wait until I learn it enough for something like that.

Page 1 of 1 All times are UTC [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group