Template:I TFObject
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.