[ZScript] find connected sectors for monster alerts?

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
Matt
Posts: 9696
Joined: Sun Jan 04, 2004 5:37 pm
Preferred Pronouns: They/Them
Operating System Version (Optional): Debian Bullseye
Location: Gotham City SAR, Wyld-Lands of the Lotus People, Dominionist PetroConfederacy of Saudi Canadia
Contact:

[ZScript] find connected sectors for monster alerts?

Post by Matt »

I'm trying to figure out how to determine if an actor that just called out an alert is within the "hearing range" of another actor in another sector. I know this has something to do with sectors and linedefs instead of just a simple radius check but have no idea what the code for this would be.

EDIT: For what it's worth, I'm using a BlockThingsIterator right now and in a way it's kinda nice how the end result is that the monsters basically hear the way the player does - no regard for walls in the way and going only by distance from the sound ource.
Post Reply

Return to “Scripting”