View unanswered posts | View active topics It is currently Thu Jan 09, 2025 3:07 pm



Reply to topic  [ 7 posts ] 
 Darn gun offsets 
Author Message
User avatar

Joined: Sun May 11, 2008 12:50 pm
Posts: 899
Reply with quote
Post Darn gun offsets
I've been making this gun, I'm pretty sure my offsets are right, but the gun seems to fire awkwardly:
Image

Both ejection and muzzle offsets are the same, but for some reason the bullets start where the red dot is. I keep thinking I missed some variable, please help.

Code for the gun

(I can't believe I'm asking an offset related question...)


Sat Feb 28, 2009 11:13 am
Profile WWW
User avatar

Joined: Wed Jan 07, 2009 10:26 am
Posts: 4074
Location: That quaint little British colony down south
Reply with quote
Post Re: Darn gun offsets
Try setting the offsets to 0 and seeing what happens....


Sat Feb 28, 2009 12:24 pm
Profile WWW
User avatar

Joined: Mon Jun 04, 2007 5:55 am
Posts: 1627
Location: Ohio
Reply with quote
Post Re: Darn gun offsets
after you define the guns offset, X reverses.

Offset, Right is -x, afterwords, Right is +x All the tutorials in the wiki have this backwards and everyone in charge of it refuses to change it.

Invert the Muzzle Offset for X (-12 to 12, or whatever)

That should put it in the right area.


Sat Feb 28, 2009 3:28 pm
Profile YIM WWW
User avatar

Joined: Mon Mar 26, 2007 1:15 am
Posts: 593
Location: UK
Reply with quote
Post Re: Darn gun offsets
Your problem is the separation variable.

The separation variable defines how far backwards from the muzzle of the gun the bullets can appear. They will appear spread out along a line as long in pixels as the separation variable, in your case 75 pixels.

This is useful for shotguns when you want to get a horizontal spread in the shot.

If you change the separation variable under 'addammo = round' to 0 or atleast less than the length of the gun then your code should work how you want.


Sat Feb 28, 2009 3:52 pm
Profile
User avatar

Joined: Sun May 11, 2008 12:50 pm
Posts: 899
Reply with quote
Post Re: Darn gun offsets
Thanks a lot bubs, it works


Sat Feb 28, 2009 4:10 pm
Profile WWW
User avatar

Joined: Mon Mar 26, 2007 1:15 am
Posts: 593
Location: UK
Reply with quote
Post Re: Darn gun offsets
Roon3 wrote:
Thanks a lot bubs, it works


Glad to be of service


Sat Feb 28, 2009 4:13 pm
Profile
User avatar

Joined: Mon Jun 04, 2007 5:55 am
Posts: 1627
Location: Ohio
Reply with quote
Post Re: Darn gun offsets
capnbubs wrote:
Your problem is the separation variable.

The separation variable defines how far backwards from the muzzle of the gun the bullets can appear. They will appear spread out along a line as long in pixels as the separation variable, in your case 75 pixels.

This is useful for shotguns when you want to get a horizontal spread in the shot.

If you change the separation variable under 'addammo = round' to 0 or atleast less than the length of the gun then your code should work how you want.


Holy Crap!

I have thought separation was vertical separation since B13! Crap! (I always just set it to 0.....)


Sun Mar 01, 2009 5:34 pm
Profile YIM WWW
Display posts from previous:  Sort by  
Reply to topic   [ 7 posts ] 

Who is online

Users browsing this forum: Google [Bot]


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.034s | 16 Queries | GZIP : Off ]