Obj sentrygun: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
m (updated template usage.)
Line 10: Line 10:
{{KV BaseEntity|base=1}}
{{KV BaseEntity|base=1}}
==Flags==
==Flags==
{{fl|2|Invulnerable}}{{bug|Invulnerable buildings can still be stunned with the {{tfwiki|Sapper}} or completely destroyed with the {{tfwiki|Red-Tape Recorder}}.}}
{{Fl TFBaseObject}}
{{fl|4|Upgradable}}
{{fl|4|Upgradable}}
{{fl|8|Infinite Ammo}}
{{fl|8|Infinite Ammo}}

Revision as of 20:13, 11 December 2022

English (en)Translate (Translate)

Team Fortress 2 obj_sentrygun is a point entity available in Team Fortress 2 Team Fortress 2.

Sentry Guns in TF2 at levels 1, 2 and 3.

Entity Description

Used to place a Tfwiki favicon.png Sentry Gun in your map. The Sentry Gun is a defensive building that puts heavy fire on any enemies that come into range. The Sentry Gun has a range of 1100 Hammer Units from its origin.

Keyvalues

TFObject:
Team (TeamNum) <choices>
Team
  • 2 : Red
  • 3 : Blue
Starting Upgrade Level (defaultupgrade) <choices>
Object spawns in the selected level.
  • 0 : Level 1
  • 1 : Level 2
  • 2 : Level 3
Note.pngNote:Values higher than 2 are accepted (need to be typed in with SmartEdit off), with the limit being 90. With higher levels, the objects gain more health/damage/recharge speed.
SolidToPlayer (SolidToPlayer) <choices>
Object is solid or non-solid to players. !FGD
  • 1 : Solid
  • 0 : Non-solid
Note.pngNote:Content moved to Rendering and studio model related KIO/Keyvalues for continuation of page history

Flags

BaseObject:
Invulnerable : [2]
Icon-Bug.pngBug:Invulnerable buildings can still be stunned with the Tfwiki favicon.png Sapper or completely destroyed with the Tfwiki favicon.png Red-Tape Recorder.
Upgradable : [4]
Infinite Ammo : [8]

Inputs

TFObject:
SetHealth <integerRedirectInput/integer>
Sets the current and maximum health. If the object is upgraded, the health will scale according to the new value.
Icon-Bug.pngBug:Crashes if set to 0.  [todo tested in ?]
AddHealth <integerRedirectInput/integer>
Increase the current health of the object. Does not surpass maximum health. Does not destroy the building if set at 0.
RemoveHealth <integerRedirectInput/integer>
Decrease current health of the object. Destroys the object if the health hits 0.
SetSolidToPlayer <booleanRedirectInput/boolean>
Sets the object to be solid or non-solid to players. 0 - non-solid, 1 - solid. !FGD
Note.pngNote:The builder of the building will always be solid to the object.
SetTeam <integerRedirectInput/integer>
Ses the team the object is allied to. Does not change skin.
Skin <integerRedirectInput/integer>
Sets the skin the object uses. Useful in conjunction with SetTeam.
SetBuilder
Sets the builder of the object to the !activator.
Show
Makes the building visible and re-enables it.
Hide
Makes the building invisible and disables it.
Icon-Bug.pngBug:Does not hide the obj_dispenser screen. A workaround is to fire the SetInactive (or SetActive) on the vgui_screen entity, although it will apply to all buildings.  [todo tested in ?]
Enable
Enable the object.
Note.pngNote:Using Enable after using the Hide input will enable the building and keep it invisible.
Icon-Bug.pngBug:Enable will reset the upgrade level on the object. Use the Show input instead, which properly re-enables the object.  [todo tested in ?]
Disable
Disable the object.
Note.pngNote:Content moved to Rendering and studio model related KIO/Inputs for continuation of page history


Outputs

Note.pngNote:Content moved to Rendering and studio model related KIO/Outputs for continuation of page history
TFObject:
OnDestroyed
Sent when object dies.
OnDamaged
Sent when hurt. Works with !activator.
OnRepaired  !FGD
Sent when repaired.
Icon-Bug.pngBug:Does not function.  [todo tested in ?]
OnDisabled  !FGD
Sent when disabled.
Icon-Bug.pngBug:Does not function.  [todo tested in ?]
OnReenabled  !FGD
Sent when enabled.
Icon-Bug.pngBug:Does not function.  [todo tested in ?]
OnObjectHealthChanged <integerRedirectOutput/integer> !FGD
Sends current health as a parameter whenever a change occurs.