SetPlaneLight

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!)

SetPlaneLight

Postby Hey Doomer » Sat Nov 13, 2021 12:35 pm

What does the Sectors method SetPlaneLight do?

It looks like it sets the floor (0) or ceiling (1) to a light level that can be read by GetFloorLight() and GetCeilingLight().

void SetPlaneLight(int pos, int level);

int level is an offset from the current sector light level e.g. positive numbers add, negatives subtract. That about it?
User avatar
Hey Doomer
 
Joined: 25 Sep 2021
Operating System: Windows 11
OS Test Version: No (Using Stable Public Version)
Graphics Processor: ATI/AMD with Vulkan Support

Re: SetPlaneLight

Postby Player701 » Tue Nov 23, 2021 7:00 am

Hey Doomer wrote:That about it?

Generally speaking, yes. Note, however, that
Hey Doomer wrote:int level is an offset from the current sector light level e.g. positive numbers add, negatives subtract.

is not always true. UDMF has a flag for sector surfaces to make this value absolute instead of relative to the sector's light level. GetFloor/CeilingLight will always return the absolute value, but SetPlaneLight sets either the relative or the absolute value depending on whether the absolute flag is set.
User avatar
Player701
 
 
 
Joined: 13 May 2009
Location: Russia
Discord: Player701#8214
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia with Vulkan support


Return to Scripting

Who is online

Users browsing this forum: SanyaWaffles and 1 guest