Help Me Please?
Sickle
Join Date: 2003-01-02 Member: 11713Members
<div class="IPBDescription">Crosshairs</div> so like i'm trying to make my own x-hairs but everytime i try to make one this shows up...
<img src='http://home.earthlink.net/~deutschsickle/pistolxhair.jpg' border='0' alt='user posted image' />
can anyone help or send a full tut with pics?
<img src='http://home.earthlink.net/~deutschsickle/pistolxhair.jpg' border='0' alt='user posted image' />
can anyone help or send a full tut with pics?
Comments
damnit..i tried to find some tuts on google but couldnt...and i looked in the thing Maus made but some downloads didn't work. gg fileplanet...
please someone help <!--emo&:(--><img src='http://www.unknownworlds.com/forums/html//emoticons/sad-fix.gif' border='0' style='vertical-align:middle' alt='sad-fix.gif' /><!--endemo-->
First of all, it looks like the rendermode isn't set to Indexed Alpha, which a crosshair should be. The last colour of the 256 colour palette should be the colour you wish the crosshair to appear in. The main image of the sprite itself is still grayscale.
To edit the palette, what i recommend you do is, in Photoshop, when you convert from RGB (Or whatever you're working in) down to Indexed Colour, set the amount of colours to 255 (Not 256), to do this, change the palette to Local (Selective), define the amount of colours and hit ok. Now open the Colour Table (Under Image > Mode > Colour Table) and select the very lower right box. It should currently be a weird chequer pattern as opposed to being a solid colour and select the colour you wish the crosshair to display.
Anyway, save that .bmp and you will have a nice 256 colour indexed bitmap with the desired colour as the last slot in the colour table. Now make a sprite out of this bitmap using SprWiz, make sure to set the transparency mode to Indexed Alpha.
Now, if you're just editing a sprite and not touching the actual dimensions of the image itself, this is where your work ends.
However, if you've bothered to edit the dimensions of the crosshair, there's more work ahead.
First, head to your ns\sprites directory and find the sprite definitions for the desired weapon you want to change the crosshair for. For example, the welder sprite definition is weapon_welder.txt. They all follow this same naming pattern, although some of the weapons may be named oddly, but you shouldn't have a problem figuring out which one you need.
Now open the file and you'll see a list of crap like the following (taken from weapon_heavymachinegun.txt)
10
weapon 320 320w 160 100 80 20
weapon_s 320 320w-s 160 100 80 20
ammo 320 640hud7 0 96 24 24
crosshair 320 xhairhmg 0 0 64 64
autoaim 320 crosshairs 0 72 24 24
weapon 640 640mw2 0 45 170 45
weapon_s 640 640mw2-s 0 45 170 45
ammo 640 640hud7 0 96 24 24
crosshair 640 xhairhmg 0 0 64 64
autoaim 640 crosshairs 0 72 24 24
Obviously it's the crosshair ones you want to be looking at.
First of all, the name is on the far left, this is obvious, next to that is something to do with resolution. The 320 and 640 mean low and high res (i can only presume, i've no idea really) I didn't bother touching the 320 ones, iirc, but if you want, set the 320 ones to the same as the 640 ones. Next along the line is the sprite name. This is without the .spr extension and the sprite itself should be located in the ns\sprites folder to work.
The next 4 numbers are coordinates and sizes. Taking this line as an example:
crosshair 640 xhairhmg <b>0</b> <b>0</b> <b>64</b> <b>64</b>
The first 0 would be how many pixels along (x axis) the top left hand corner of the area you wish to use for the sprite is. If this gets confusing, look at the attached image.
The next number (in this case 0 as well) is how many pixels down (y axis) the top left hand corner of the sprite area is.
The third number (64) is how wide (in pixels) the sprite area is, and the final number (again, 64) is the height.
Using the coordinates and dimensions in this example, the sprite is 64x64 pixels and the area starts in the very very top left of the image itself (0x0 pixels).
The way this is done is so you can bundle a whole load of crosshairs or whatever into a single sprite file and just reference each area and dimensions in that sprite.
I hope this made some form of sense. It does in my mind, at least.
that made total sense when you walked through it. Thank you!!!