Adding GLDEFS to TEXTURES?

Ask about ACS, DECORATE, ZScript, or any other scripting questions here!

Moderator: GZDoom Developers

Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.

Please bear in mind that the people helping you do not automatically know how much you know. You may be asked to upload your project file to look at. Don't be afraid to ask questions about what things mean, but also please be patient with the people trying to help you. (And helpers, please be patient with the person you're trying to help!)
Post Reply
User avatar
Hidden Hands
Posts: 1053
Joined: Tue Sep 20, 2016 8:11 pm
Location: London, England
Contact:

Adding GLDEFS to TEXTURES?

Post by Hidden Hands »

I need a little help... I have a wall texture that has a light built into it. I want the light to have a glow, but I'm not sure how to add a GLDEF to a texture. I can do it fine with sprites, but textures I haven't a clue.

I know it can be done, since I've seen mods that use it. Help please?

Thanks in advance.
Gez
 
 
Posts: 17946
Joined: Fri Jul 06, 2007 3:22 pm

Re: Adding GLDEFS to TEXTURES?

Post by Gez »

You probably refer to this? [wiki]GLDEFS#Glowing_flats[/wiki] It's not a real light (it won't affect sprites, for examples) and there are other limitations.

Some people manually place pointlight objects in maps at places where a texture shows a light fixture. But that's not automatic.
User avatar
Hidden Hands
Posts: 1053
Joined: Tue Sep 20, 2016 8:11 pm
Location: London, England
Contact:

Re: Adding GLDEFS to TEXTURES?

Post by Hidden Hands »

Gez wrote:You probably refer to this? [wiki]GLDEFS#Glowing_flats[/wiki] It's not a real light (it won't affect sprites, for examples) and there are other limitations.

Some people manually place pointlight objects in maps at places where a texture shows a light fixture. But that's not automatic.
So how would I achieve the best effect? Should I instead use an invisible sprite with a GLDEF attached to it?
Gez
 
 
Posts: 17946
Joined: Fri Jul 06, 2007 3:22 pm

Re: Adding GLDEFS to TEXTURES?

Post by Gez »

No need, there's [wiki=Classes:DynamicLight]light actors you can use[/wiki] instead.
User avatar
Hidden Hands
Posts: 1053
Joined: Tue Sep 20, 2016 8:11 pm
Location: London, England
Contact:

Re: Adding GLDEFS to TEXTURES?

Post by Hidden Hands »

Okay, awesome! Which one would be the best choice? Flicker lightRandom? Also where is this located in GZDoom Builder? I'm probably just being stupid but I cant find it.
User avatar
Enjay
 
 
Posts: 27060
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland
Contact:

Re: Adding GLDEFS to TEXTURES?

Post by Enjay »

There is a section for dynamic lights (and a section for spot lights too).



Attenuated lights are generally considered to be the most realistic looking but the other types can have their uses too. A bit of trial and error in your own map might be needed until you get a good feel for how the different types look and how best to place them. The wiki can help with descriptions of what they do and how they work too (i.e. Gez's link).
User avatar
Hidden Hands
Posts: 1053
Joined: Tue Sep 20, 2016 8:11 pm
Location: London, England
Contact:

Re: Adding GLDEFS to TEXTURES?

Post by Hidden Hands »

Thank you so much, I managed to apply a light, and it looks pretty much perfect. I do have a slight issue though. I tried to do the same in another location. The difference this time is, that the "light" texture is a linedef IN FRONT of a wall, so it looks like its attached to the front of it. The dynamic lights however, when I place them near this, light the wall up but not the linedef with the texture of the light on it in front, breaking the illusion of it looking like a light.

Is there a tip to fix this issue?
Attachments
dimbulb.png
Post Reply

Return to “Scripting”