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



Reply to topic  [ 10 posts ] 
 Offset inconsistencies 
Author Message
User avatar

Joined: Wed Feb 27, 2008 4:04 am
Posts: 30
Reply with quote
Post Offset inconsistencies
So, I'm working on a simple revolver handgun, and I wanted the magazine to drop out, and insert a new one. So I have the handgun sprite with a hole in the middle, and a sprite for a magazine that fits perfectly inside. However, when I got the offsets correct so that when the gun is placed in the game, it's lined up, anybody that picks it up screws up the offsets. And it changes depending on what direction you are facing. So the resulting relative position of the magazine to the gun is different in 3 different scenarios. Anyone know why this would happen?


Wed Jun 03, 2009 12:17 am
Profile
REAL AMERICAN HERO
User avatar

Joined: Sat Jan 27, 2007 10:25 pm
Posts: 5655
Reply with quote
Post Re: Offset inconsistencies
Do you have a large pink (0,255,255) area around your sprite? Is it correctly within the game palette?


Wed Jun 03, 2009 2:25 am
Profile
User avatar

Joined: Wed Feb 27, 2008 4:04 am
Posts: 30
Reply with quote
Post Re: Offset inconsistencies
Yeah it is within palette. The only thing I can imagine that might cause it is having an odd number of pixels in height or width. CC seems to change the offsets by 1 when you have an odd height and you flip the sprite.


Wed Jun 03, 2009 3:41 pm
Profile
REAL AMERICAN HERO
User avatar

Joined: Sat Jan 27, 2007 10:25 pm
Posts: 5655
Reply with quote
Post Re: Offset inconsistencies
DO YOU HAVE A LARGE AREA AROUND YOUR SPRITE? Post the actual file, directly.


Thu Jun 04, 2009 1:31 am
Profile
User avatar

Joined: Mon Dec 08, 2008 1:11 pm
Posts: 17
Reply with quote
Post Re: Offset inconsistencies
There should be a 1 pixel pink border around your sprite, no more, no less. It's the easiest way to edit the offsets later on.


Thu Jun 04, 2009 3:43 pm
Profile
User avatar

Joined: Wed Feb 27, 2008 4:04 am
Posts: 30
Reply with quote
Post Re: Offset inconsistencies
No, when I sprite I like to leave absolutely no extra space around the image. Nevertheless, I have attached the sprite I am talking about.
It almost seems like when CC inverts sprites, they are being adjusted one pixel to the left.

It isn't just my sprites either. I've noticed it happening elsewhere in the game with the vanilla content. (ex: Nailgun) It's only ever one pixel, so I doubt anyone really notices, but when trying to get a 3x2 sprite to fit perfectly inside of anther sprite, that one pixel means all the difference.

I mean, I got the offsets perfect when the gun wasn't being held, as in when I bought the gun in build mode, the clip was snug inside the pistol. When dropped into the game, it rotated about, no problem. But when an actor picks it up, it's different. I can get it adjusted for either left-held, right-held, or on the ground, but not all three. It's always off by 1.

@Deltasquid - Do you really think that having the border would affect my problem? I suppose I can try it. (Not right now, I'm at work)


Attachments:
R44000.bmp [1.13 KiB]
Not downloaded yet
Thu Jun 04, 2009 4:11 pm
Profile
User avatar

Joined: Mon Dec 08, 2008 1:11 pm
Posts: 17
Reply with quote
Post Re: Offset inconsistencies
Invalidator wrote:
No, when I sprite I like to leave absolutely no extra space around the image.


I'm not 100% sure, but I believe this screwed up my very first mods. It seems to conflict and make CC act random with offsets.

Again, not 100% sure, I'm just suggesting you add a border and try again.


Thu Jun 04, 2009 4:23 pm
Profile
User avatar

Joined: Sat Jun 16, 2007 2:31 am
Posts: 2982
Location: Texas
Reply with quote
Post Re: Offset inconsistencies
...What.

The extra blank pixels around the sprite has no effect on it whatsoever.


Thu Jun 04, 2009 4:35 pm
Profile
User avatar

Joined: Mon Dec 08, 2008 1:11 pm
Posts: 17
Reply with quote
Post Re: Offset inconsistencies
Really? Damn. I guess I single-handedly screwed up my first mods then.
Ah well, no idea what the problem is. Hope you find out, because it sounds like it'd be very frustrating.


Thu Jun 04, 2009 4:43 pm
Profile
REAL AMERICAN HERO
User avatar

Joined: Sat Jan 27, 2007 10:25 pm
Posts: 5655
Reply with quote
Post Re: Offset inconsistencies
Uh, why not just make the sprite one pixel larger so that CC can evenly flip it? Seems like the easiest choice and it's not as though people are going to notice that one pixel.


Thu Jun 04, 2009 10:32 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 10 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:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware for PTF.
[ Time : 0.041s | 16 Queries | GZIP : Off ]