Properly Avoiding the "Pollen Sprites" in Half-Life
(November 12, 2017)
In Half-Life, NPCs have very peculiar placement rules. If you put them too close to any brushes or level geometry, even if there's a noticeable gap between the two, more than likely, you'll see sprites akin to yellow pollen surrounding your NPC. Other times, the NPC might not even be in the same spot as it was in the editor.
You don't need to reconfigure your entire level if something like this occurs. A simple workaround involves the use of a
scripted_sequence entity to move the NPC into position when the level is run.
Fixing the pollen sprites
1. Place the NPC where you'd like it to be in the final map.
In our example map, a
monster_scientist (named Walter and herein referred to as such) is up against a wall. In this state, Walter would give off the unwanted "pollen" sprites.
2. Copy your NPC to an empty space, preferrably off the ground.
You'll want to give it space (at least 32 units or so on all sides) so as to avoid the pollen sprites. Raise the NPC off the ground a few units just to make sure (this is good practice even if you're not scripting an NPC). It really doesn't matter where it is, because it won't be there when the map is run. We now have two Walters, and the one we're keeping will be in the middle of the floor.
3. Turn the original NPC into a
In our example, the original Walter against the wall will now be the
scripted_sequence block. Walter himself is a short distance away. Rename or delete the name from the
scripted_sequence and set the
m_iszEntity ("Target Monster") keyvalue to Walter. If you want an idle animation, you can set one with the
m_iszIdle ("Idle Animation") keyvalue. Walter now has
sitidle as his idle animation.
4. Set the Move to Position keyvalue of the
scripted_sequence to "Instantaneous".
This means that, when the map is run, the
scripted_sequence will move the NPC to its location immediately. If you have SmartEdit off, set
Walter will now sit against the wall without any pollen sprites whatsoever.
How does it work?
developer 1 set, a "pollenated" NPC will make something like this appear in the console:
With this method, the NPC is moved into position at runtime. This prevents any errors because the NPC was technically in a safe position at the start of the map. One minor drawback is that the NPC will teleport into location when the map is run, so be careful not to spawn the player where they might be able to see it.
This also works for
monster_generic entities, as seen with
pipebubbles.mdl in the Blast Pit chapter of Half-Life. GoldSrc modeller The303 gives another example of its usage, with an escalator model being placed into a sloped surface with no errors at all.