Page 1 of 2

[Request] Widget that can display a texture when unit select

Posted: 31 May 2010, 11:03
by Forboding Angel
Hard to fit all that in a subject.

Basically, all I need is something that will allow a texture to be displayed over the map surface (centered on the unit of course) when the unit is selected.

The closest things I can thing of are sc2 protoss pylons (they show their range) and zerg creep tumors.

Ability for animated would be awesome but not necessary :-)

Needs to be able to handle multiple units utilizing multiple textures (1 texture per unit).

Re: [Request] Widget that can display a texture when unit select

Posted: 31 May 2010, 11:12
by zwzsg
When the player is deciding where to place the structure, or after the structure has been build, and is selected?

Re: [Request] Widget that can display a texture when unit select

Posted: 31 May 2010, 23:12
by Forboding Angel
Good point, and the answer would be "both"

Re: [Request] Widget that can display a texture when unit select

Posted: 01 Jun 2010, 18:40
by CarRepairer
Spectate a CA game, wait 5 minutes in and select an energy building, and see if that's what you want.

Re: [Request] Widget that can display a texture when unit select

Posted: 01 Jun 2010, 20:45
by Forboding Angel
I was told that I wasn't allowed to use that due to the fact that evo's models aren't community property yet (everything else is tho, barring artwork), while I disagree with someone telling me that I can't use a gpl'd item, I did say that I would respect his wishes. Regardless, unless I'm mistaken that thing is tied in fairly hardcore with CA and extricating it would probably be a bitch.

Re: [Request] Widget that can display a texture when unit select

Posted: 01 Jun 2010, 20:49
by CarRepairer
Ohhh so that's how that whole convo started. I see. Never mind then, no need to detail your request thread.

Re: [Request] Widget that can display a texture when unit select

Posted: 01 Jun 2010, 21:07
by Forboding Angel
Long story really short, I came into the ca channel (after being directed there by one of the ca guys telling me of a new widget that ca had that I should implement), I asked about said widget and asked for a direction and promptly received an earful from the author about how it isn't fair for code to be shared when models and models textures aren't.

While imo it's comparing apples to oranges, I cut my losses and backed out of the convo pretty quickly and said I would respect his wishes, regardless of license legalism.

******************************************************

There is already a range ring so this isn't so important that I'll slit my wrists over it, but it is pretty important and I'd really appreciate the help if someone would be willing to do this for me.

Re: [Request] Widget that can display a texture when unit select

Posted: 02 Jun 2010, 16:01
by knorke
maybe teamplatter widget? but thats just a color not a texture I think.
But then "protoss pylons" are only one color too.

Re: [Request] Widget that can display a texture when unit select

Posted: 03 Jun 2010, 07:06
by Forboding Angel
Teamplatter... most definitely not.

Also, I beg to differ:
Image
Clipboard01.jpg
(896.79 KiB) Downloaded 7 times

Re: [Request] Widget that can display a texture when unit select

Posted: 03 Jun 2010, 15:37
by JohannesH
...

Image

Re: [Request] Widget that can display a texture when unit select

Posted: 03 Jun 2010, 20:33
by AF
Drawing the team platter but loading and binding a texture beforehand should be enough shouldnt it?

Re: [Request] Widget that can display a texture when unit select

Posted: 03 Jun 2010, 23:53
by trepan
If you want it to conform to the ground height
variations, you might want to use DrawGroundQuad()
(or use $heightmap, or whatever gets you the same
results.) You can use GL's texture generation facilities
to avoid computing the texture coords yourself (or do
the same with a shader).

Re: [Request] Widget that can display a texture when unit select

Posted: 04 Jun 2010, 01:36
by Licho
Just use the damn CA code, it's not finished anyway (does not show for queued structures)

Re: [Request] Widget that can display a texture when unit select

Posted: 04 Jun 2010, 10:31
by Forboding Angel
Look, I'm not going to use it if I'm stepping on someone's toes. That was never my intention. I don't want to piss anyone off, and I got the feeling when I asked about the ca widget in #ca that that is exactly what I was doing, which is why I tried to semi gracefully back out of the conversation. I didn't realize that it was a sore point and I decided right then and there that gpl or no gpl, nothing is worth stomping on people's feet just to get a silly feature that doesn't really have much impact on gameplay (yes, it would make things more obvious, but still, I can work around it if I have to).

Re: [Request] Widget that can display a texture when unit select

Posted: 04 Jun 2010, 15:33
by Niobium

Code: Select all

gl.Texture(...)
gl.DrawGroundQuad(left, top, right, bottom, false, true)
Done?

Re: [Request] Widget that can display a texture when unit select

Posted: 08 Jun 2010, 21:06
by zwzsg

Re: [Request] Widget that can display a texture when unit select

Posted: 09 Jun 2010, 04:25
by Forboding Angel
Winsauce widget is winsauce!!!

Thank you! :D:D:D

Re: [Request] Widget that can display a texture when unit select

Posted: 09 Jun 2010, 20:29
by zwzsg
And with animation:

Re: [Request] Widget that can display a texture when unit select

Posted: 09 Jun 2010, 22:54
by Forboding Angel
/me humps z's leg

Thank you!!!

Re: [Request] Widget that can display a texture when unit select

Posted: 10 Jun 2010, 04:00
by FLOZi
Pics or it didn't happen? :wink: