Make an Actor block monster line of sight?
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!)
-
-
- Posts: 17465
- Joined: Mon Oct 27, 2003 12:07 am
- Location: Kuala Lumpur, Malaysia
Make an Actor block monster line of sight?
Is it possible to make an Actor break monster sight checks? Say I'm trying to make an Actor that looks like a huge box, and you can push the box around to "hide" from other monsters.
-
- Lead GZDoom+Raze Developer
- Posts: 49183
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: Make an Actor block monster line of sight?
No. The sight checking code only checks linedefs. If it had to traverse actors as well it'd slow down considerably.
-
- Posts: 1562
- Joined: Tue Oct 20, 2015 12:50 pm
- Graphics Processor: nVidia with Vulkan support
- Location: Kozolupy, Bohemia
Re: Make an Actor block monster line of sight?
Polyobject? I know, its crude and halfway solution, but it could be used as pushable object/hideout.
Graf, are polyobjects counted when doing the sight check? I think yes, because they're linedefs after all (I suppose).
Graf, are polyobjects counted when doing the sight check? I think yes, because they're linedefs after all (I suppose).
-
- Lead GZDoom+Raze Developer
- Posts: 49183
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: Make an Actor block monster line of sight?
Yes, polyobjects are counted. This is needed so that closed swinging doors block sight
-
- Posts: 1606
- Joined: Mon Jun 12, 2017 12:57 am
Re: Make an Actor block monster line of sight?
But polyobjects have inf. height, no!?
And I see there are function. Maybe this is what you want!?
And I see there are
Code: Select all
native bool IsVisible(Actor other, bool allaround, LookExParams params = null);
-
- Admin
- Posts: 6191
- Joined: Thu Feb 26, 2004 3:02 pm
- Preferred Pronouns: He/Him
Re: Make an Actor block monster line of sight?
You could do a two-sided polyobject. Those can be visually shorter, if you can prevent (or don't mind) the player seeing the "paper thin" walls from the top or bottom. Can't remember if they can be walked on or not (I think not).