Skip to main content

monster_sentry

monster_sentry icon
Point entity

The Sentry Gun is a gun on a tripod that turns to its enemies and fires. A touch or a hit wakes it up, and it doesn't switch itself off.

Attributes​

The entity also has these common keys:

  • Naming and triggering: Name
  • Position: Pitch Yaw Roll
  • Appearance: all except Effects
  • Monsters: Classification, Is player ally, Prisoner to, Ignored by, Prisoner, Unkillable, Custom Field Of View, WaitTillSeen, Trigger on death, TriggerTarget and Fade Corpse
KeyDescriptionDefault
Targettarget

Names the entities it fires, which get On when the Sentry Gun switches on and when it is destroyed, and Off when it switches off.

Trigger ConditionTriggerCondition

Sets the event that fires TriggerTarget.

  • No Trigger (0) - Nothing fires
  • See Player, Mad at Player (1) - The monster sees a player that it is angry at
  • Take Damage (2) - The monster takes damage
  • 50% Health Remaining (3) - The monster's health drops to half or less
  • Death (4) - The monster dies
  • See Player Unconditional (10) - The monster sees a player, whether it is angry at them or not
  • See Player, Not In Combat (11) - The monster sees a player while it isn't fighting
  • Got healed (13) - Someone heals the monster
Default No Trigger (0)
Trigger Alternative ConditionTriggerAltCondition

Sets a second event that fires TriggerTarget. The first of the two events to happen fires it, and only once.

  • No Trigger (0)
  • See Player, Mad at Player (1)
  • Take Damage (2)
  • 50% Health Remaining (3)
  • Death (4)
  • See Player Unconditional (10)
  • See Player, Not In Combat (11)
  • Got healed (13)
Default No Trigger (0)
Custom Turning Rateturnrate

Sets how fast the Sentry Gun starts turning, in degrees per second, and when it is far off its target, it speeds up to as much as 10 times this.

If you leave this key empty or set 0, it is 30.

Default 0
Ignore Friendly DamageFf

Sets whether damage from monsters on its side hurts it.

  • No (0) - All damage hurts it
  • Yes (1) - Damage from monsters on its side doesn't hurt it
Default No (0)

Flags​

32Autostart

The Sentry Gun switches itself on when it sees an enemy, while without this flag, it stays off until you trigger, touch or hit it

64Start Inactive

With Autostart, the Sentry Gun doesn't look for enemies until you trigger it once

In combat​

The Sentry Gun has 100 health, and each of its bullets deals 12 to 29 damage. With Fade Corpse (512), the wreck fades out once its smoke ends, and so does the wreck of one that a monstermaker made, unless the maker's Number of Monsters is 1.

Death triggerHalf-Life Unified SDK​

If Trigger Condition or Trigger Alternative Condition is "Death", the Sentry Gun fires its TriggerTarget when it is destroyed, once its death ends. A Sentry Gun only checks its trigger conditions when it takes a new enemy, when a hit leaves it alive and when it is destroyed, so "Got healed" fires at the first hit after the heal.

See also​

Changes since 1.38​

  • Destroyed turrets, sentry guns and ichthyosaur bodies fade away when the map sets the Fade Corpse flag. Their own death code never read the flag. This was a bug in SBO 1.38
  • Fixed a destroyed turret or Sentry Gun keeping its place in its monster maker. The maker never heard that it died. This was a bug in SBO 1.38
  • Fixed turrets, Sentry Guns, the Apache and the Osprey never firing their Trigger Condition. In SBO 1.38, their own AI code never checked it
  • Fixed the Sentry Gun ignoring its Custom Turning Rate. It never read the key. This was a bug in SBO 1.38
  • Fixed Ignore Friendly Damage turning off on Feds, Heavy Weapons Feds, Fed Hunters, Assassins and Sentry Guns when the map gave another key after it. Every later key set it back to off. This was a bug in SBO 1.38