Game Development Community

RTSUnit Selection Circle

by Emil Diego · in RTS Starter Kit · 06/17/2005 (10:34 am) · 6 replies

I am havign a problem with the RTS Game I am creating. Normally when you select on a RTS Unit or Building a green circle appears around it to show that It has been selected. For some strange reason, the circle is not being drawn correctly so what I get is a filled in rectange instead.

So when I mouseover or click on any of the units, the health bar gets drawn above it, but a filled in rectangle get drawn below it. Does anyone know where the code is that renders the selection circle?

#1
06/17/2005 (10:35 am)
Have you modified any rendering code? It's probably a mismatched render state.

The selection circle code is in terrSelection.cc, I believe.
#2
06/17/2005 (12:42 pm)
I haven't changed any of the engines source code.
#3
06/17/2005 (4:15 pm)
Can you post your pc specs and maybe changes to script? dont need to go into detail. Also maybe your compiler and OS.
#4
06/18/2005 (12:28 am)
I can't remember exactly where the code is that calls it, but the selection circle is an image taken from a hardcoded location in the file structure, rather than drawing an actual circle. If you have moved the files around or transferred anything to a new location you may have lost this file. The location in stock TGE is in ~/starter.RTS/client/ui, and the name of the file is "ring_white.png". If you don't have this file, just replace it with a new one, with whatever picture you like.
#5
06/18/2005 (4:36 am)
Check this resource out, it addresses that and one other issue:
Here
#6
06/21/2005 (6:33 am)
Ben:
That's what I think is happening to me. I found an entry in the colsole that says Could not load texture: starter.RTS/client/ui/ring_white.

The path seems to be hardcoded in the source code. in the file terdata.cc on line 801:
mSelectionTexture = TextureHandle("starter.RTS/client/ui/ring_white", BitmapTexture, true);

Once I changed this and recompiled everything worked great. Thanx for the help.