[ZSCRIPT] Remove Actors Dynamic Lights set in GLDEFS

Ask about ACS, DECORATE, ZScript, or any other scripting questions here!
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!)
Kan3x
Posts: 67
Joined: Tue Nov 08, 2022 4:19 pm

[ZSCRIPT] Remove Actors Dynamic Lights set in GLDEFS

Post by Kan3x »

Hello all

Like the title says, I'd like to know if there's a way to remove the dynamic lights defined in GLDEFS attached to any actor in a map.
We're talking about lights not attached through the A_AttachLightDef() function, but directly set on the actors frames in GLDEFS.

Navigating through the code of GZDoom I found this:

Code: Select all

void FLevelLocals::DeleteAllAttachedLights()
{
	auto it = GetThinkerIterator<AActor>();
	AActor * a;

	while ((a=it.Next())) 
	{
		a->DeleteAttachedLights();
	}
}
but I can't seem to find a way to use it in Zscript D:

Is it even possible?

Return to “Scripting”