View unanswered posts | View active topics It is currently Wed Dec 25, 2024 6:59 pm



Reply to topic  [ 3 posts ] 
 MuzzleOffset changing 
Author Message

Joined: Mon Dec 21, 2015 9:30 am
Posts: 89
Reply with quote
Post 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?


Mon Jun 06, 2016 9:16 am
Profile
Forum Moderator
User avatar

Joined: Fri Feb 02, 2007 3:53 pm
Posts: 1896
Location: in my little gay bunker
Reply with quote
Post 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.


Mon Jun 06, 2016 10:23 pm
Profile

Joined: Mon Dec 21, 2015 9:30 am
Posts: 89
Reply with quote
Post 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.


Tue Jun 07, 2016 4:02 am
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 3 posts ] 

Who is online

Users browsing this forum: No registered users


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware for PTF.
[ Time : 0.046s | 13 Queries | GZIP : Off ]