You shall not pass!

How to prevent monsters from going somewhere

Gandalf blocking the way

What if you want the player to be able to go somewhere but not the monsters?
Several techniques exists...

Cattle guard

Cattle guard

Those archers are been had!

Those of you familiar with the countryside probably know what a "cattle guard" is: a ditch across the road with parallel metal bars letting you pass on foot or by car, but frightening the cattle because their hooves would slip between the bars. So it acts like an invisible yet very efficient barrier for cows.
Funnily enough this technique can work in Hexen II as well with walking monsters like golems or archers: they will stop if they think they may fall into a ditch in the ground, even if that ditch 1°) is narrow enough to let the player pass without even noticing its existence 2°) is invisible thanks to a func_illusionary making a smooth visual connection between the two sides of the ditch.
The following picture sums it up:

Cattle guard in Hexen II

16 x 16 width/depth should be enough but feel free to test and adjust to your map specificities.

Owner 1

The cattle guard technique only works with walking monsters. Flying, swimming and teleporting monsters don't care about cattle guards, which is an interesting way to make selective barriers depending on the monster type. But what if you want to prevent ANY TYPE of monster to come in?
It's even simpler actually: make a func_wall entity with the CLIP texture. Having that specific hardcoded texture means the func_wall will be invisible but impossible to pass through. Now set its owner property to 1. Entity #1 always corresponds to the player, and if the player is the owner of an entity, then both of them are mutually no clipping. Typically the owner is automatically set to 1 by the game for projectiles fired by the player to prevent them from being hurt by their own weapons.
That's it: your func_wall is now a barrier for everybody but the player.

Of course this technique implicitly suppose we are talking about a singleplayer map where there are monsters and only one player (entity #1) to take care about.

If you want to go further about technical insights concerning this technique, you can read in-depth explanations by Preach here and there.

Caveat Preventing monsters to go somewhere is cool but remember that the game is not free of bugs, and often the monster moves are already awkward and easily contrained by the architecture. Constraining them even more can lead to very unnatural looking situations, if a monster suddenly stops chasing the player in a specific direction whereas the player doesn't see any logical explanation for that weird behavior. It's notably true with the golem able to stop walking and stupidly punch in the air towards the player without moving: looks ridiculous!
That's why the aforementioned tricks must be used with frugality, and even better: not used at all if you can do otherwise with a better architecture, or find tricks to set up things so that the presence of a monster in the concerned area would not be such a problem (like my anti monster/puzzle_piece collision trick).

Want to ask for clarification, report an issue with this trick or propose another one? Drop me an email If you use the trick please credit me and put a link to this website.