Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / Custom Crosshairs...

Author
Message
Cian Rice
20
Years of Service
User Offline
Joined: 8th Jun 2004
Location:
Posted: 11th Jun 2004 03:44
How do I change the cross hair in my game. At the moment I have a circle that follows the mouse and acts as a crosshair but I want to use an image I've created, anyone know what to do?
P.s
I use DBCenhanced

Got anime?
I do.
Lost in Thought
20
Years of Service
User Offline
Joined: 4th Feb 2004
Location: U.S.A. : Douglas, Georgia
Posted: 11th Jun 2004 04:14
Make a sprite from image and put it where your circle is. I don't know the commands for DBC to do this ... sorry I only use DBP.

In DBP it would be: Before your main loop:


And put this once in your loop

Hope this helps I'm sure you can do something like this in DBC or you could just make a plain, texture it your crosshair texture, set transparency on, and use alpha channels in your texture to make it partially see through.

Cian Rice
20
Years of Service
User Offline
Joined: 8th Jun 2004
Location:
Posted: 11th Jun 2004 04:41
Thanks for the help, it will be helpful once I upgrade to DBPro, but not at the moment.

Got anime?
I do.
hyrichter
20
Years of Service
User Offline
Joined: 15th Feb 2004
Location: Arizona
Posted: 11th Jun 2004 08:08
Actually, what I found works the best with DBC is to make a plain and texture it with your image. Use the "set object" command to make the black areas of your image transparent, and lock the plain to the screen. Here's an example.



Using textured plains is WAY faster than sprites with DBC since you're not mixing 2D with 3D. Hope this helps.

Cian Rice
20
Years of Service
User Offline
Joined: 8th Jun 2004
Location:
Posted: 11th Jun 2004 22:27
Thanks, it worked.
You get to be in the game's credits.

Got anime?
I do.
Cian Rice
20
Years of Service
User Offline
Joined: 8th Jun 2004
Location:
Posted: 12th Jun 2004 00:37
Also, I have a cross hair but I want the white to be transperant, so it doesn't look like a white square with a cross hair in it, how do I do this?

Got anime?
I do.
HoverFrog
21
Years of Service
User Offline
Joined: 7th Aug 2003
Location: Canada
Posted: 12th Jun 2004 06:50
Change the white to black with an image editor and do like hyrichter said: Set Object --> set the transparent flag to 1
Cian Rice
20
Years of Service
User Offline
Joined: 8th Jun 2004
Location:
Posted: 13th Jun 2004 16:34
I have a problem with this cross hair I don't get full movement of the mouse, can someone make a code so It moves where my mouse moves, because it makes the aiming in my game almos impossible...

Got anime?
I do.
Newbie Brogo
21
Years of Service
User Offline
Joined: 10th Jul 2003
Location: In a Pool of Cats
Posted: 14th Jun 2004 00:22 Edited at: 14th Jun 2004 00:25
Do you want it to follow your mouse? Well, I always find that Sprites work, nothing fancy, very simple



and bam, you get the image to follow your mouse. If it's a little off just subtract some value from mousex() or mousey()
I hope this is what you were looking for... Mabey not... but at least I tried 'Eh!
Ah, but this is for an FPS right? so it may not be that great mixing it with 3D. Just position whatever your using the crosshair for at mousex() and mousey().
Works for me.

Cian Rice
20
Years of Service
User Offline
Joined: 8th Jun 2004
Location:
Posted: 14th Jun 2004 00:32
Thanks for trying but I was hoping it would be like this basic command:

just with the sprite, which it didn't seem to do...
Don't know why my self, cuz it's pretty much the same.

Got anime?
I do.

Login to post a reply

Server time is: 2024-11-26 21:31:16
Your offset time is: 2024-11-26 21:31:16