Template:I TFObject

From Valve Developer Community
Jump to: navigation, search


SetHealth <integer>
Sets the current and maximum health. If the object is upgraded, the health will scale according to the new value.
Bug.png Bug: Crashes if set to 0.
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.png Note: The builder of the building will always be solid to the object.
SetTeam <integer>
Ses the team the object is allied to. Does not change skin.
Skin <integer>
Sets the skin the object uses. Useful in conjunction with SetTeam.
Sets the builder of the object to the !activator.
Makes the building visible and re-enables it.
Makes the building invisible and disables it.
Bug.png Bug: 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.
Enable the object.
Note.png Note: Using Enable after using the Hide input will enable the building and keep it invisible.
Bug.png Bug: Enable will reset the upgrade level on the object. Use the Show input instead, which properly re-enables the object.
Disable the object.