Make monsters not have "Infinite Vision"?
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!)
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!)
Make monsters not have "Infinite Vision"?
Hey, I was wondering if there is a way to make enemy actors have limited vision instead of see you from infinity for example, you are in a large area and enemies can't see you from a far without using Doom builder Lindef blockers. I have not seen this ever before in a Doom mod, But I was wondering if its possible? I am specifically wanting to make it effect enemies via slade if possible. Thanks.
Re: Make monsters not have "Infinite Vision"?
A_LookEx can take maximum see distance as a parameter.
Setting it to a value like 512 will make monsters not see the player from over 512 units away.
Setting it to a value like 512 will make monsters not see the player from over 512 units away.
Re: Make monsters not have "Infinite Vision"?
Hmm, Didn't think It would be this easy. Now can this be adjusted, for example maybe if 512 was too far or too close?Jarewill wrote:A_LookEx can take maximum see distance as a parameter.
Setting it to a value like 512 will make monsters not see the player from over 512 units away.
Re: Make monsters not have "Infinite Vision"?
Yes, A_LookEx is customizable.
minseedist sets the minimum distance required to see the player, so if this value is 256 and the player is closer than that, the monster won't see them.
maxseedist sets the maximum distance required to see the player, so if this value is 256 and the player is further than that, the monster won't see them.
minseedist sets the minimum distance required to see the player, so if this value is 256 and the player is closer than that, the monster won't see them.
maxseedist sets the maximum distance required to see the player, so if this value is 256 and the player is further than that, the monster won't see them.
Re: Make monsters not have "Infinite Vision"?
I played around with A_LookEx, I can't seem to figure out what number values do what. Would you be able to dumb it down for me?
A_LookEx(0, 0, 0, 0, "See")
A_LookEx(0, 0, 0, 0, "See")
- Caligari87
- Admin
- Posts: 6229
- Joined: Thu Feb 26, 2004 3:02 pm
- Preferred Pronouns: He/Him
- Contact:
Re: Make monsters not have "Infinite Vision"?
It's right there on the wiki page: [wiki]A_LookEx[/wiki]

A_LookEx (int flags, float minseedist, floatmaxseedist, float maxheardist, double fov, state label)
The distances are in map units (a door is 128 units wide).Jarewill wrote:minseedist sets the minimum distance required to see the player, so if this value is 256 and the player is closer than that, the monster won't see them.
maxseedist sets the maximum distance required to see the player, so if this value is 256 and the player is further than that, the monster won't see them.
