Obj sentrygun: Difference between revisions
Jump to navigation
Jump to search
Note: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.
m (→Keyvalues) |
(Updated with data from tf-abs.fgd) |
||
Line 1: | Line 1: | ||
{{ | {{tf2 point|obj_sentrygun}} | ||
==Entity | ==Entity description== | ||
Used to place a sentry gun in your map. The sentry gun it creates is the same as a normal one erected by an engineer in-game that can be repaired, damaged, and upgraded depending on it's flag settings. There are currently no options in the obj_sentygun settings to prevent it from being sapped by spies, or running out of ammunition. | Used to place a sentry gun in your map. The sentry gun it creates is the same as a normal one erected by an engineer in-game that can be repaired, damaged, and upgraded depending on it's flag settings. There are currently no options in the obj_sentygun settings to prevent it from being sapped by spies, or running out of ammunition. | ||
== Keyvalues == | ==Keyvalues== | ||
{{KV Targetname}} | |||
{{KV Parentname}} | |||
{{KV Angles}} | |||
{{KV TFObject}} | |||
== Flags == | ==Flags== | ||
* | * 2 : Invulnerable | ||
: | * 4 : Upgradable | ||
==Inputs== | |||
{{I Targetname}} | |||
{{I Parentname}} | |||
{{I Angles}} | |||
{{I TFObject}} | |||
== | ==Outputs== | ||
{{ | {{O Targetname}} | ||
{{O TFObject}} | |||
Revision as of 21:00, 9 May 2011
obj_sentrygun
is a point entity available in Team Fortress 2.
Entity description
Used to place a sentry gun in your map. The sentry gun it creates is the same as a normal one erected by an engineer in-game that can be repaired, damaged, and upgraded depending on it's flag settings. There are currently no options in the obj_sentygun settings to prevent it from being sapped by spies, or running out of ammunition.
Keyvalues
- Name (targetname) <string>[ Edit ]
- The name that other entities refer to this entity by, via Inputs/Outputs or other keyvalues (e.g.
parentname
ortarget
).
Also displayed in Hammer's 2D views and Entity Report.See also: Generic Keyvalues, Inputs and Outputs available to all entities
Parentname:
- Parent (parentname) <targetname>
- Specifies a movement parent. An entity will maintain its initial offset from its parent. An attachment point can be added to the end of the name, separated by a comma.
- Pitch Yaw Roll (Y Z X) (angles) <QAngle>
- This entity's orientation in the world. Pitch is rotation around the Y axis, yaw is the rotation around the Z axis, roll is the rotation around the X axis.
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

- SolidToPlayer (SolidToPlayer) <choices>
- Object is solid or non-solid to players. !FGD
- 1 : Solid
- 0 : Non-solid
Flags
- 2 : Invulnerable
- 4 : Upgradable
Inputs
Parentname:
- SetParent <string >
- Move with this entity. See Entity Hierarchy (parenting).
- SetParentAttachment <string >
- Change this entity to attach to a specific attachment point on its parent. The entity will teleport so that the position of its root bone matches that of the attachment. Entities must be parented before being sent this input.
- SetParentAttachmentMaintainOffset <string >
- As above, but without teleporting. The entity retains its position relative to the attachment at the time of the input being received.
- ClearParent
- Removes this entity from the the movement hierarchy, leaving it free to move independently.
TFObject:
- SetHealth <integer >
- Sets the current and maximum health. If the object is upgraded, the health will scale according to the new value.
Bug:Crashes if set to 0. [todo tested in ?]
- AddHealth <integer >
- Increase the current health of the object. Does not surpass maximum health. Does not destroy the building if set at 0.
- RemoveHealth <integer >
- Decrease current health of the object. Destroys the object if the health hits 0.
- SetSolidToPlayer <boolean >
- Sets the object to be solid or non-solid to players. 0 - non-solid, 1 - solid. !FGD
Note:The builder of the building will always be solid to the object.
- 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.
Bug:Does not hide the obj_dispenser screen. A workaround is to fire the
SetInactive
(orSetActive
) on the vgui_screen entity, although it will apply to all buildings. [todo tested in ?]
- Enable
- Enable the object.
Note:Using
Enable
after using theHide
input will enable the building and keep it invisible.Bug:
Enable
will reset the upgrade level on the object. Use theShow
input instead, which properly re-enables the object. [todo tested in ?]
- Disable
- Disable the object.
Outputs
TFObject:
- OnDestroyed
- Sent when object dies.
- OnDamaged
- Sent when hurt. Works with !activator.