monster_sentry

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
targetNames the entities it fires, which get On when the Sentry Gun switches on and when it is destroyed, and Off when it switches off.
TriggerConditionSets 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
No Trigger (0)TriggerAltConditionSets 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)
No Trigger (0)turnrateSets 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.
0FfSets 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
No (0)Flags
32AutostartThe 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 InactiveWith 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 trigger
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
monster_turret- the large auto turretmonster_miniturret- the small turret- monster_sentry on TWHL - the Half-Life entity
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