Game Development Community

Mystery Crosshair Box

by Brendan McLeod · in Torque Game Engine · 07/26/2006 (11:13 am) · 10 replies

I put a crosshair in my game (based off of the 1.4 FPS demo) and now when I switch out to Third-Person Mode, an arbitrary white box with nothing inside of it appears on the heads up display and doesn't leave unless I call a GUI Dialog. Anyone know what this and how to get rid of it?

#1
07/26/2006 (2:42 pm)
What do you mean you "put a crosshair" in your game? Do you mean you just changed the graphics for it? Or did you do something with code? The default crosshair is _supposed_ to simply not render the crosshair in third person mode...
#2
07/26/2006 (5:02 pm)
I added a new GuiCrosshairHud to playGui, where none existed before. The default crosshair was taken out when we wiped a lot of the game's clutter out before we started building our own. I've only interacted with it in the Gui Editor.
#3
07/26/2006 (8:02 pm)
I have no idea why that could happen... it shows up fine in first person right? Do you want it to be showing up in third person? Could try making it so it does and see if that "fixes" it too.
#4
07/27/2006 (10:48 am)
It shows up fine in first person. I don't want it in third person, I just want it to behave normally.
#5
07/27/2006 (11:01 am)
Open up your client\ui\playGui.gui file.

Make sure your crosshair GUI looks something like this:
new GuiCrossHairHud(reticleHud) {
      Profile = "GuiDefaultProfile";
      HorizSizing = "center";
      VertSizing = "center";
      position = "496 368";
      Extent = "32 32";
      MinExtent = "8 2";
      Visible = "1";
      bitmap = "./reticle/m16Reticle";
      wrap = "0";
      damageFillColor = "0 1 0 1";
      damageFrameColor = "1 0.6 0 1";
      damageRect = "50 4";
      damageOffset = "0 32";
   };
#6
07/27/2006 (11:05 am)
Mine looks essentially the same.
#7
07/27/2006 (11:58 am)
Is the white box as big as your crosshair or is it much smaller?
#8
07/27/2006 (12:09 pm)
Much smaller.

I'm starting to get it in first-person mode too now. One of my other teammates activated a frames per second meter, could that be having any effect?
#9
07/27/2006 (12:27 pm)
I don't think that would affect it. I think that the white box you're seeing is a tooltip. I had it show up recently in a demo I made where I had deleted the GuiShapeNameHud and set NoCursor to 0. This caused little white boxes with the letters ap in them to appear. Turned out they were tooltips on the playGui, since the shapeNameHud was gone the cursor was now detecting and displaying tooltips for the playGui. I fixed by commenting out all the tooltips in the playGui.
#10
07/27/2006 (2:10 pm)
That worked perfectly. Thanks very much!