Func null: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(explain why (is useful, actuatly))
Line 1: Line 1:
{{this is a|brush entity|name=func_null|game=Mapbase}} It is a brush version of of {{ent|info_null}}{{why}}.
{{this is a|brush entity|name=func_null|game=Mapbase}} It is a brush version of of {{ent|info_null}}. This can be used for creating [[texlight]]s that don't have a visible brush in-game, such as for prop-based lights or accentuating lighting coming in from a window.}}
 
Because this entity isn't removed on compile, it still counts toward the entity limit until removed on map spawn.  


Because this entity isn't removed on compile, it still counts toward the [[edict]] limit for a split second until removed on map spawn.
{{ModernCodenote|This entity uses the same C++ class as info_null. As such, the same behavior can be achieved in any game simply by manually setting a brush entity's classname to info_null.
{{bug|Hammer will strip brushes from entities which are defined in the FGD as point entities. It also does not allow a point entity and brush entity to share the same classname, as it will only use the most recently defined version.}}
Alternatively, add an func_null FGD entry to base.fgd; it will spit out an error in the console when loading the map, but will otherwise be ignored by the game.}}
== Keyvalues ==
== Keyvalues ==
{{KV Origin}}
{{KV Origin}}

Revision as of 13:26, 27 June 2024

func_null is a brush entity available in Mapbase Mapbase. It is a brush version of of info_null. This can be used for creating texlights that don't have a visible brush in-game, such as for prop-based lights or accentuating lighting coming in from a window.}}

Because this entity isn't removed on compile, it still counts toward the edict limit for a split second until removed on map spawn.

Cpp.pngCode:This entity uses the same C++ class as info_null. As such, the same behavior can be achieved in any game simply by manually setting a brush entity's classname to info_null.
Icon-Bug.pngBug:Hammer will strip brushes from entities which are defined in the FGD as point entities. It also does not allow a point entity and brush entity to share the same classname, as it will only use the most recently defined version.  [todo tested in ?]
Alternatively, add an func_null FGD entry to base.fgd; it will spit out an error in the console when loading the map, but will otherwise be ignored by the game.

Keyvalues

Origin:

Origin (X Y Z) (origin) <origin>
The position of this entity's center in the world. Rotating entities typically rotate around their origin.
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

Internal keyvalues used by VRAD:

Shadows (vrad_brush_cast_shadows) <boolean> (in all games since Source 2007)
Determines if this entity will cast lightmap shadows.