Func null: Difference between revisions
Jump to navigation
Jump to search
Code: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.
Note: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. This be circumvented by using
comp_kv_setter to change the classname from func_null to info_null.
Alternatively, add a func_null FGD entry to base.fgd; it will spit out a harmless error in the console when loading the map, but will otherwise be ignored by the game, and will never count as an edict, unlike info_null.
AltNames: This entity is also tied to
SirYodaJedi (talk | contribs) mNo edit summary |
SirYodaJedi (talk | contribs) No edit summary |
||
(23 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
{{this is a|brush entity|name=func_null|game=Mapbase}} It is a brush version of of {{ent|info_null}}{{ | {{CD|CNullEntity|file1=[https://github.com/mapbase-source/source-sdk-2013/blob/master/sp/src/game/server/subs.cpp subs.cpp]|nolink=1}} | ||
{{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 for [[window lighting|accentuating lighting coming in from a window]]. | |||
Because this entity isn't removed on compile, it still counts toward the server-side entity limit for a split second until removed on map spawn. Since Mapbase 7.3, it will not count as an [[edict]]. | |||
{{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. | |||
{{note|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. This be circumvented by using {{teamspen}} [[comp_kv_setter]] to change the {{mono|classname}} from {{mono|func_null}} to {{mono|info_null}}.}} | |||
Alternatively, [[#FGD entry|add a func_null FGD entry to base.fgd]]; it will spit out a harmless error in the console when loading the map, but will otherwise be ignored by the game, and will never count as an edict, unlike info_null.}} | |||
{{AltNames|name1=[[info_null]]}} | |||
==Keyvalues== | |||
{{KV Origin}} | |||
{{KV Targetname null}} | |||
{{minititle|Internal keyvalues used by [[VRAD]]}} | |||
{{KV|Shadows|intn=vrad_brush_cast_shadows|boolean|Determines if this entity will cast [[lightmap]] shadows. | |||
|since={{src07}}}} | |||
==FGD entry== | |||
If using func_null outside of Mapbase, add this FGD entry to the end of [[base.fgd]]: | |||
<source lang=c> | |||
@SolidClass base(Origin) = func_null : | |||
"A nonexistent entity that gets ignored by the game (will cause an error in the console, but this can be ignored." | |||
+ "Useful for invisible texlights, such as those appearing to be cast by props or which accentuate the light coming in through a window." | |||
[ | |||
targetname(target_source) : "Name" : : "Name to use if this is a target for lighting calculations" | |||
vrad_brush_cast_shadows(choices) : "Cast Baked Shadows" : 0 : "Set this if this brush casts lightmap shadows." = | |||
[ | |||
0 : "No" | |||
1 : "Yes" | |||
] | |||
] | |||
</source> |
Latest revision as of 06:17, 31 March 2025
![]() |
---|
CNullEntity |
![]() |
func_null
is a brush entity available in 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 for accentuating lighting coming in from a window.
Because this entity isn't removed on compile, it still counts toward the server-side entity limit for a split second until removed on map spawn. Since Mapbase 7.3, it will not count as an edict.




info_null
. 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>
- Name of this entity. Can be used by compile tools as a spotlight target or a prop_static's lighting origin.
Also displayed in Hammer's 2D views and Entity Report.
Internal keyvalues used by VRAD:
- Shadows (vrad_brush_cast_shadows) <boolean> (in all games since
)
- Determines if this entity will cast lightmap shadows.
FGD entry
If using func_null outside of Mapbase, add this FGD entry to the end of base.fgd:
@SolidClass base(Origin) = func_null :
"A nonexistent entity that gets ignored by the game (will cause an error in the console, but this can be ignored."
+ "Useful for invisible texlights, such as those appearing to be cast by props or which accentuate the light coming in through a window."
[
targetname(target_source) : "Name" : : "Name to use if this is a target for lighting calculations"
vrad_brush_cast_shadows(choices) : "Cast Baked Shadows" : 0 : "Set this if this brush casts lightmap shadows." =
[
0 : "No"
1 : "Yes"
]
]