Author |
Message |
Invalidator
Joined: Wed Feb 27, 2008 4:04 am Posts: 30
|
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 |
|
|
Grif
REAL AMERICAN HERO
Joined: Sat Jan 27, 2007 10:25 pm Posts: 5655
|
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 |
|
|
Invalidator
Joined: Wed Feb 27, 2008 4:04 am Posts: 30
|
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 |
|
|
Grif
REAL AMERICAN HERO
Joined: Sat Jan 27, 2007 10:25 pm Posts: 5655
|
Re: Offset inconsistencies
DO YOU HAVE A LARGE AREA AROUND YOUR SPRITE? Post the actual file, directly.
|
Thu Jun 04, 2009 1:31 am |
|
|
Deltasquid
Joined: Mon Dec 08, 2008 1:11 pm Posts: 17
|
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 |
|
|
Invalidator
Joined: Wed Feb 27, 2008 4:04 am Posts: 30
|
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 |
|
|
Deltasquid
Joined: Mon Dec 08, 2008 1:11 pm Posts: 17
|
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 |
|
|
whitty
Joined: Sat Jun 16, 2007 2:31 am Posts: 2982 Location: Texas
|
Re: Offset inconsistencies
...What.
The extra blank pixels around the sprite has no effect on it whatsoever.
|
Thu Jun 04, 2009 4:35 pm |
|
|
Deltasquid
Joined: Mon Dec 08, 2008 1:11 pm Posts: 17
|
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 |
|
|
Grif
REAL AMERICAN HERO
Joined: Sat Jan 27, 2007 10:25 pm Posts: 5655
|
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 |
|
|
|