Script That Checks Brightness of Sector Actor is In

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!)
Post Reply
User avatar
NiTROACTiVE
Posts: 48
Joined: Sun Jan 13, 2019 12:02 am
Location: United States
Contact:

Script That Checks Brightness of Sector Actor is In

Post by NiTROACTiVE »

Let's say I wanted to make a script that checks the brightness of a sector the player/actor is in, sort of like how [wiki]CheckActorCeilingTexture[/wiki] checks what flat is above the actor.

For example, let's say if the sector the actor was in a sector that had a brightness of 120 or higher, then some Imps would spawn around the player. How could I start a script like that?
Jarewill
 
 
Posts: 1855
Joined: Sun Jul 21, 2019 8:54 am

Re: Script That Checks Brightness of Sector Actor is In

Post by Jarewill »

How about using GetActorLightLevel?
It seems like it would do what you want.
User avatar
NiTROACTiVE
Posts: 48
Joined: Sun Jan 13, 2019 12:02 am
Location: United States
Contact:

Re: Script That Checks Brightness of Sector Actor is In

Post by NiTROACTiVE »

Jarewill wrote:How about using GetActorLightLevel?
It seems like it would do what you want.
Yes, that's what I was looking for. Thanks for the help.
Post Reply

Return to “Scripting”