I would like to know what stealth elements are in Half-Life 2 and how does the enemy AI detect the player.

Specifically, I would like to know:

  • Can enemies detect by sound?

    • Will weapon sounds (gunfire, grenade explosion, crowbar hit sound) alert them? (even if not hitting them, but are within their earshot)
    • Will walking or crouch walking lessen sound (compared to sprinting)?
  • Can enemies detect light levels?

    • Do enemies detect light from the flashlight (and are you more likely to be detected with the flashlight on)?
    • Will hiding in dark places work?
  • Do enemies see behind their backs (i.e. Can you can sneak up on them if their backs are turned to you)?

  • Does hiding behind objects work (or do enemies see through objects)?
  • Are enemies alerted forever? (i.e. If they detected you, will they be permanently be on alert for you, or will they go back to their previous routine once you have been out of their sight for some time)
  • Do enemies alert each other if one of them has sighted you (or is detection, per individual enemy unit)?
  • Does the enemy notice you if you are near their vicinity (relative to enemy's location) or is enemy detection of the player scripted (fixed), and you can't avoid detection once you are in a certain area?
  • Any enemies with unique behavior when it comes to player detection?

You may have noticed that this is similar to my other question about Black Mesa. Please see this meta discussion on why they are posted separately.

2 Answers 2

  • Enemy scripting tends to keep them from activating until the player has arrived in the area. Gunfire within their "arena" will alert them, but generally they're already active by then. Walking and crouching doesn't have any game effect on detection. Most detection isn't – it's scripted activation, not AI detection.

  • Enemies are insensitive to light levels. The flashlight doesn't alert them to your presence. Usually they already act like they know you're there. Hiding and line-of-sight is not a notable game mechanic. Enemies either know you're there or they don't – once activated, they will know where you are at all times (unless of course they're acting out a "where is the target" scripted scene, which happens but is limited to fixed moments in the game).

  • Enemies are alerted forever, and all enemies in an arena's group will activate at the same time as soon as you arrive at the trigger location. They don't deactivate or engage in a search routine like in stealth-based games.

  • Enemy activation is mostly or entirely scripted. You generally can't avoid detection, although you sometimes have a second or two between when the script triggers and when the script makes the enemy start acting like it's aware of you. You can get off a few shots in that time, but there's no way to avoid activation once their script starts running.

  • The different categories of enemies are scripted to act differently. Combine soldiers and support creatures generally behave as if they are using networked/radio intelligence on your location. Animals and xenofauna behave more like animals, using different triggers (e.g. stepping on sand near antlions, water creatures ignoring you until you're in the water) to activate.


I have answers to two parts of your question.

  1. Are enemys alerted by gunshots? Answer: Well yes and no. I discovered this in HL2EP2 at the roadblock when you are trying to destroy the Autoguns. There will be a combine soldier who is shooting a zombie with a shotgun. If you shoot or kill him, the other soldiers will be alerted to your presence. So basically, Enemys will be alerted to you if you shoot or kill one of them (even if they didnt see you.)

  2. Are enemys alerted forever after you alert them? Answer: yes and no again! I'm not sure but I think this only applies to HL2, at the bit after you climb out of Barney's window, you enter the ticket station from a prohibited section and there is a Combine Guard with a Stunstick. When he sees you, he will smack you until you run away. after you run away, HE IS NOT ALERTED TO YOU ANYMORE.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .