Hi,
I always preferred when you had to push a key to open the door or press the switch, rather than just walk towards it. However, the trigger field in Hexen II is just too large. Especially for rotating door. I know it is probably because they didn't want the player to get squashed all the time, but this way the door often opens when one stands in the middle of the room, so in my maps I use manual trigger fields that targets the door. My question is: Is this trigger field hard-coded thing that cannot be altered anyhow?
Door trigger field
Re: Door trigger field
Hi Mathuz,
I would say it's hard coded in HexenC, not in the game engine. So it's not so "hard" coded after all: you may tweak the code without having to modify the game engine.
My understanding is that the code line responsible for creating the trigger field is that one in doors.hc:
with the spawn_field function also being defined in that file.
Unfortunately, I have a very bad understanding of how vector calculations work. So I can tell where it's done, but not precisely how the magic works...
I would say it's hard coded in HexenC, not in the game engine. So it's not so "hard" coded after all: you may tweak the code without having to modify the game engine.
My understanding is that the code line responsible for creating the trigger field is that one in doors.hc:
Code: Select all
self.owner.trigger_field = spawn_field(cmins, cmaxs, self.owner);
Unfortunately, I have a very bad understanding of how vector calculations work. So I can tell where it's done, but not precisely how the magic works...

-
- Posts: 23
- Joined: Mon Apr 08, 2019 3:06 am
Re: Door trigger field
The trigger is as large as the door (more specifically, a cube that encompasses all its points, since collision boxes don't rotate), plus 60 units added in both horizontal directions. So you'd want to change the 60 value in the vector addition. It could use an entity field that's not otherwise used by doors (like self.height). That way it wouldn't override anything in the base game and could be set manually in maps.