How do you change where a bullet is fired from a sprite?

Got questions about Shipmaker? Get answers here. Please read the stickied topics first!

Moderators: th15, Moderators

Post Reply
User avatar
TheBuilder
Commander
Commander
Posts: 133
Joined: Sat Jan 09, 2010 4:24 am

How do you change where a bullet is fired from a sprite?

Post by TheBuilder »

Normally when you set a regular section sprite as a custom weapon sprite, the weapon's bullet fires from the center of the sprite, but for sprites made to be weapons, the bullet fires from the end, or wherever it's supposed to.

In other words, how do you change where a bullet is fired from a custom sprite?
Not even death can stop the truly determined.

My goal is to build the most epic thing possible, PERIOD.

I told them, "I want to add to the world."
They said, "Then learn how to use the editor."
I asked, "What is the editor?"
They said, "Life."
User avatar
Anna
The artist formerly known as SilverWingedSeraph
Posts: 3447
Joined: Wed Sep 26, 2007 8:51 pm
Location: Elsewhere

Re: How do you change where a bullet is fired from a sprite?

Post by Anna »

TheBuilder wrote:Normally when you set a regular section sprite as a custom weapon sprite, the weapon's bullet fires from the center of the sprite, but for sprites made to be weapons, the bullet fires from the end, or wherever it's supposed to.

In other words, how do you change where a bullet is fired from a custom sprite?
Err... you can't. It's just a matter of setting up the sprite so that it looks right when the weapon fires, and so it's centered in such a way that it rotates properly. There's no way to actually select a point that the projectile will come out of.
Founder and Event Coordinator for the BSF Beauty Pageant. Founder of the Pseudo-Chainship Project. Admin. Games Master.
Quality Control Enforcer
Gay cute girl and fucking proud of it.
User avatar
TheBuilder
Commander
Commander
Posts: 133
Joined: Sat Jan 09, 2010 4:24 am

Re: How do you change where a bullet is fired from a sprite?

Post by TheBuilder »

Then how in the blazes do weapons fire out of the ends of their default sprites?

Oh well, I figured that would be the case.

Thanks.
Not even death can stop the truly determined.

My goal is to build the most epic thing possible, PERIOD.

I told them, "I want to add to the world."
They said, "Then learn how to use the editor."
I asked, "What is the editor?"
They said, "Life."
User avatar
Anna
The artist formerly known as SilverWingedSeraph
Posts: 3447
Joined: Wed Sep 26, 2007 8:51 pm
Location: Elsewhere

Re: How do you change where a bullet is fired from a sprite?

Post by Anna »

TheBuilder wrote:Then how in the blazes do weapons fire out of the ends of their default sprites?
Because the default sprites are CODED INTO THE GAME.

Custom weapon sprites, obviously, aren't.
Founder and Event Coordinator for the BSF Beauty Pageant. Founder of the Pseudo-Chainship Project. Admin. Games Master.
Quality Control Enforcer
Gay cute girl and fucking proud of it.
User avatar
TheBuilder
Commander
Commander
Posts: 133
Joined: Sat Jan 09, 2010 4:24 am

Re: How do you change where a bullet is fired from a sprite?

Post by TheBuilder »

True, and yet, there are many custom weapon sprites that are actually made in a way that they line up with the firing point.

Try explaining that one lolz. :lol:
Not even death can stop the truly determined.

My goal is to build the most epic thing possible, PERIOD.

I told them, "I want to add to the world."
They said, "Then learn how to use the editor."
I asked, "What is the editor?"
They said, "Life."
User avatar
Arcalane
Pseudofeline Overlord
Posts: 4034
Joined: Thu Sep 13, 2007 10:37 am
Location: UK

Re: How do you change where a bullet is fired from a sprite?

Post by Arcalane »

TheBuilder wrote:True, and yet, there are many custom weapon sprites that are actually made in a way that they line up with the firing point.

Try explaining that one lolz. :lol:
It's pretty simple. The way the game handles it is it spawns the shot at the center of the sprite, and then places it "forward" (towards the barrel-end of the gun) by a # of pixels equal to the bullet's speed.

This often (but not always) coincides with the end of the barrel. When it doesn't, you get bullets appearing out of thin air ahead of the barrel, or appearing in the barrel.
  /l、
゙(゚、 。 7
 l、゙ ~ヽ
 じしf_, )ノ
User avatar
TheBuilder
Commander
Commander
Posts: 133
Joined: Sat Jan 09, 2010 4:24 am

Re: How do you change where a bullet is fired from a sprite?

Post by TheBuilder »

Interesting, didn't know about the speed thing.

Thanks though, this has been rather helpful.
Not even death can stop the truly determined.

My goal is to build the most epic thing possible, PERIOD.

I told them, "I want to add to the world."
They said, "Then learn how to use the editor."
I asked, "What is the editor?"
They said, "Life."
Post Reply