Func nobuild: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(→‎Normal Use: about respawnrooms)
m (→‎Inputs: Substituted IO templates)
 
(38 intermediate revisions by 18 users not shown)
Line 1: Line 1:
{{wrongtitle|title=func_nobuild}}
{{LanguageBar}}
{{CD|CFuncNoBuild|file1=tf/func_no_build.cpp|base=CBaseTrigger}}
{{this is a|brush entity|name=func_nobuild|game=Team Fortress 2}}
 
<!-- Add the categories to the main page, not here. Some template, such as {{This is a}}, and all Table templates should be placed to the main page. -->
==Entity Description==
==Entity Description==
A func_nobuild entity will restrict an engineer from building in the specific area it contains.
A <code>func_nobuild</code> entity will restrict an Engineer from building in the specific area it contains.
==Availability==
This brush-based [[entity]] is exclusive to Team Fortress 2.
==Normal Use==
A func_nobuild area should come in contact with the top side of the brush you don't want the engineer to build upon.  The func_nobuild should also be at least 96 units high to keep an engineer from bypassing it by jumping above it.  Keep in mind that a [[func_respawnroom]] entity also blocks an engineers ability to build and thus a func_nobuild does not have to be placed in the same location as a func_respawnroom.


==Ledges==
===Normal Use===
[[Image:nobuild_ledge.gif|thumb|right|Here you can see the required 96 units for each accessible side]]
A <code>func_nobuild</code> area should come in contact with the top side of the brush you don't want the engineer to build upon. The <code>func_nobuild</code> should also be at least 96 units high to keep an Engineer from bypassing it by jumping above it. Keep in mind that a {{Ent|func_respawnroom}} entity also blocks an Engineer's ability to build, and thus a <code>func_nobuild</code> does not have to be placed in the same location as a <tt>func_respawnroom</tt>.{{Note|Keep in mind that a <code>func_nobuild</code> only prevents the center of the Engineer's buildings from being placed on top of a surface, not the whole structure; parts of the building can actually overlap the <code>func_nobuild</code> area.{{todo|add picture example here}}}}
High ledges present an element a bit different from a standard floor surface. If there is a ledge you do not want an engineer to build upon, the func_nobuild area should not only be 96 units above the surface, but 96 units below the surface as well. It should also stick out 96 units from all accessible sides of the ledge. If the ledge is less then 96 units above a larger flat surface, the func_nobuild only needs to touch the top of the surface the ledge is above.
 
==Example Map==
[[File:Nobuild_ledge.gif|thumb|300px|right|The required 96 units for each accessible side.]]
An example map demonstrating the entity in use can be downloaded here:
===Ledges===
[http://www.mediafire.com/?vl4dxzxktzf http://www.mediafire.com/?vl4dxzxktzf]
High ledges present an element a bit different from a standard floor surface. If there is a ledge you do not want an engineer to build upon, the <code>func_nobuild</code> brush should not only be 96 units above the surface, but 96 units below the surface as well, with the <code>func_nobuild</code> brush overlapping the ledge. It should also stick out 96 units from all accessible sides of the ledge. If the ledge is less then 96 units above a larger flat surface, the <code>func_nobuild</code> only needs to touch the top of the surface the ledge is above.{{clr}}


==Keyvalues==
==Keyvalues==
*{{kv targetname}}
{{KV Targetname}}
*{{kv enabledisable}}
{{KV TeamNum|tf2=1}}
*{{kv tfteam}}
{{KV EnableDisable}}
{{KV|Allow Sentries|intn=AllowSentry|bool|Allow or disallow building sentries.}}
{{KV|Allow Dispensers|intn=AllowDispenser|bool|Allow or disallow building dispensers.}}
{{KV|Allow Teleporters|intn=AllowTeleporters|bool|Allow or disallow building teleporters.}}
{{KV|Destroy Buildings|intn=DestroyBuildings|bool|Whether or not to destroy buildings already within the volume once it activates.}}
 
==Inputs==
==Inputs==
*{{i targetname}}
{{I|SetTeam|Sets which team to be aligned with.|param=int}}
*{{i enabledisable}}
{{I|SetActive|Activates the nobuild zone.}}
==Outputs==
{{I|SetInactive|Deactivates the nobuild zone.|nofgd=1}}
*{{o targetname}}
{{I|ToggleActive|Toggle the state of the nobuild zone.|nofgd=1}}
[[Category:Team Fortress 2 Entities]]
{{I EnableDisable}}
{{todo|what is the difference between whether it's active and whether it's enabled?}}

Latest revision as of 10:56, 21 April 2025

English (en)Español (es)Translate (Translate)
C++ Class hierarchy
CFuncNoBuild
CBaseTrigger
CBaseToggle
CBaseEntity
C++ func_no_build.cpp

func_nobuild is a brush entity available in Team Fortress 2 Team Fortress 2.

Entity Description

A func_nobuild entity will restrict an Engineer from building in the specific area it contains.

Normal Use

A func_nobuild area should come in contact with the top side of the brush you don't want the engineer to build upon. The func_nobuild should also be at least 96 units high to keep an Engineer from bypassing it by jumping above it. Keep in mind that a func_respawnroom entity also blocks an Engineer's ability to build, and thus a func_nobuild does not have to be placed in the same location as a func_respawnroom.

Note.pngNote:Keep in mind that a func_nobuild only prevents the center of the Engineer's buildings from being placed on top of a surface, not the whole structure; parts of the building can actually overlap the func_nobuild area.
Todo: add picture example here
The required 96 units for each accessible side.

Ledges

High ledges present an element a bit different from a standard floor surface. If there is a ledge you do not want an engineer to build upon, the func_nobuild brush should not only be 96 units above the surface, but 96 units below the surface as well, with the func_nobuild brush overlapping the ledge. It should also stick out 96 units from all accessible sides of the ledge. If the ledge is less then 96 units above a larger flat surface, the func_nobuild only needs to touch the top of the surface the ledge is above.

Keyvalues

Name (targetname) <string>[ Edit ]
The name that other entities refer to this entity by, via Inputs/Outputs or other keyvalues (e.g. parentname or target).
Also displayed in Hammer's 2D views and Entity Report.
See also:  Generic Keyvalues, Inputs and Outputs available to all entities

TeamNum:
Initial Team (TeamNum) <choices>
Which Team the entity belongs / is assigned to on spawn
  • 0: None
  • 1: Spectator/Halloween Souls Team Fortress 2
  • 2: RED Team Fortress 2
  • 3: BLU/Robots Team Fortress 2
  • 5: Halloween Bosses (only in Team Fortress 2) !FGD
Start Disabled (StartDisabled) <boolean>
Stay dormant until activated (with theEnableinput).
Allow Sentries (AllowSentry) <boolean>
Allow or disallow building sentries.
Allow Dispensers (AllowDispenser) <boolean>
Allow or disallow building dispensers.
Allow Teleporters (AllowTeleporters) <boolean>
Allow or disallow building teleporters.
Destroy Buildings (DestroyBuildings) <boolean>
Whether or not to destroy buildings already within the volume once it activates.

Inputs

SetTeam <integerRedirectInput/integer>
Sets which team to be aligned with.
SetActive
Activates the nobuild zone.
SetInactive  !FGD
Deactivates the nobuild zone.
ToggleActive  !FGD
Toggle the state of the nobuild zone.

EnableDisable:

Enable / Disable
Enable/disable this entity from performing its task. It might also disappear from view.
Todo: what is the difference between whether it's active and whether it's enabled?