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 / please read and reply if you know

Author
Message
Ashley computer freek
21
Years of Service
User Offline
Joined: 28th May 2003
Location:
Posted: 28th May 2003 22:55
how do I create a crosshair on my screen and make it so i can aim with it
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 28th May 2003 23:38
2D or 3D environment?

In 3D, create a transparent plain, position it, and LOCK OBJECT TO SCREEN()

Thanks in advance.
All the Best,
StevieVee
Ashley computer freek
21
Years of Service
User Offline
Joined: 28th May 2003
Location:
Posted: 29th May 2003 11:09
how do i use transparancy?

John H
Retired Moderator
22
Years of Service
User Offline
Joined: 14th Oct 2002
Location: Burlington, VT
Posted: 29th May 2003 17:53
Make your crosshair texture. Make a BLACK SQUARE with the crosshair in the middle. Texture a plain with that texture. Look into the SET OBJECT COMMAND and set the TRANSPARENCY FLAG to 1.

RPGamer

Current Project: Eternal Destiny
Questions? Comments? Suggestions? Go to the Eternal Destiny Forum!
Ashley computer freek
21
Years of Service
User Offline
Joined: 28th May 2003
Location:
Posted: 30th May 2003 14:27
thank you thats going to make my games much better

Kale
22
Years of Service
User Offline
Joined: 8th Sep 2002
Location: United Kingdom
Posted: 30th May 2003 16:16
@Ashley computer freek

RTFM!

What the flame does not consume, consumes the flame.
------------------------------------------------------------------------
AMD XP2100+, Geforce4Ti 4400, 512Mb DDR, Abit KX7, WinXP Home
Lord Helmet
21
Years of Service
User Offline
Joined: 30th May 2003
Location:
Posted: 30th May 2003 18:46
The suggestion about a transparent plane would work, but why not just insert a simple bit of 2D drawing right before the sync command. this is the way it's done in at least Unreal Tournament, because this is how you can change its RGB color.

for example

rem Cx1,2 and Cy1,2 are the vars for where you want your crosshairs
to appear

do
rem your game code
rem set draw color to whatever color you want your crosshairs to be
line Cx1,Cx2
line Cy1,Cy2
sync
loop

this way your engine doesn't have to declare yet one more object and you can make your crosshairs change colors at whim, by changeing a color variable.

Login to post a reply

Server time is: 2024-11-24 16:28:40
Your offset time is: 2024-11-24 16:28:40