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

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

Discuss Lua based Spring scripts (LuaUI widgets, mission scripts, gaia scripts, mod-rules scripts, scripted keybindings, etc...)

Moderators: Moderators, Moderators

User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14616
Joined: 17 Nov 2005, 02:43

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

Post 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).
0 x

User avatar
zwzsg
Kernel Panic Co-Developer
Posts: 7017
Joined: 16 Nov 2004, 13:08

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

Post by zwzsg »

When the player is deciding where to place the structure, or after the structure has been build, and is selected?
0 x

User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14616
Joined: 17 Nov 2005, 02:43

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

Post by Forboding Angel »

Good point, and the answer would be "both"
0 x

User avatar
CarRepairer
Cursed Zero-K Developer
Posts: 3359
Joined: 07 Nov 2007, 21:48

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

Post by CarRepairer »

Spectate a CA game, wait 5 minutes in and select an energy building, and see if that's what you want.
0 x

User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14616
Joined: 17 Nov 2005, 02:43

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

Post 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.
0 x

User avatar
CarRepairer
Cursed Zero-K Developer
Posts: 3359
Joined: 07 Nov 2007, 21:48

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

Post by CarRepairer »

Ohhh so that's how that whole convo started. I see. Never mind then, no need to detail your request thread.
0 x

User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14616
Joined: 17 Nov 2005, 02:43

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

Post 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.
0 x

User avatar
knorke
Posts: 7971
Joined: 22 Feb 2006, 01:02

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

Post by knorke »

maybe teamplatter widget? but thats just a color not a texture I think.
But then "protoss pylons" are only one color too.
0 x

User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14616
Joined: 17 Nov 2005, 02:43

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

Post by Forboding Angel »

Teamplatter... most definitely not.

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


User avatar
AF
AI Developer
Posts: 20671
Joined: 14 Sep 2004, 11:32

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

Post by AF »

Drawing the team platter but loading and binding a texture beforehand should be enough shouldnt it?
0 x

trepan
Former Engine Dev
Posts: 1200
Joined: 17 Nov 2005, 00:52

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

Post 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).
0 x

User avatar
Licho
Zero-K Developer
Posts: 3803
Joined: 19 May 2006, 19:13

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

Post by Licho »

Just use the damn CA code, it's not finished anyway (does not show for queued structures)
0 x

User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14616
Joined: 17 Nov 2005, 02:43

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

Post 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).
0 x

User avatar
Niobium
Posts: 456
Joined: 07 Dec 2008, 02:35

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

Post by Niobium »

Code: Select all

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

User avatar
zwzsg
Kernel Panic Co-Developer
Posts: 7017
Joined: 16 Nov 2004, 13:08

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

Post by zwzsg »

0 x

User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14616
Joined: 17 Nov 2005, 02:43

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

Post by Forboding Angel »

Winsauce widget is winsauce!!!

Thank you! :D:D:D
0 x

User avatar
zwzsg
Kernel Panic Co-Developer
Posts: 7017
Joined: 16 Nov 2004, 13:08

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

Post by zwzsg »

And with animation:
0 x

User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14616
Joined: 17 Nov 2005, 02:43

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

Post by Forboding Angel »

/me humps z's leg

Thank you!!!
0 x

User avatar
FLOZi
MC: Legacy & Spring 1944 Developer
Posts: 6112
Joined: 29 Apr 2005, 01:14

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

Post by FLOZi »

Pics or it didn't happen? :wink:
0 x

Post Reply

Return to “Lua Scripts”

cron