This article's documentation is for anything that uses the Source engine. Click here for more information.

Info null: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(Non-existent entities are harmless; see editor_text and info_ladder (and in goldsrc, info_texlights, info_smoothvalue, info_translucent, etc))
Tag: Undo
No edit summary
Line 8: Line 8:
* Change <tt>info_null</tt> to inherit from [[CServerOnlyEntity]] instead of [[CBaseEntity]]
* Change <tt>info_null</tt> to inherit from [[CServerOnlyEntity]] instead of [[CBaseEntity]]
* Add the following line to the [[CNullEntity]] class:<source lang=c>CNullEntity() : CBaseEntity(true){ }</source>
* Add the following line to the [[CNullEntity]] class:<source lang=c>CNullEntity() : CBaseEntity(true){ }</source>
}} {{workaround|If this is an issue when not shipping your own mod binaries, changing the classname of this entity in your map to a non-existent entity (ex: {{mono|info_target_null}}) will prevent the entity from being networked, as it gets discarded as an unknown entity when it tries to spawn. It will say {{code|"Attempted to create unknown entity type info_target_null!"}} in the console, but this can be safely ignored. }} }}
}} {{workaround|If this is an issue when not shipping your own mod binaries, changing the classname of this entity in your map to a non-existent entity (ex: {{mono|info_target_null}} or {{ent|editor_text}}) will prevent the entity from being networked, as it gets discarded as an unknown entity when it tries to spawn. It will say {{code|"Attempted to create unknown entity type info_target_null!"}} in the console, but this can be safely ignored. }} }}
{{altnames|game={{mapbase|2}}|name1=[[func_null]]}}
{{altnames|game={{mapbase|2}}|name1=[[func_null]]}}



Revision as of 16:11, 14 March 2025

C++ Class hierarchy
CNullEntity
CBaseEntity
C++ subs.cpp

info_null is a point entity available in all Source Source games.

It is removed as soon as it spawns. It is primarily useful as a target for pointing lights at. Another possibility is to use it during map development as a way of keeping location-based notes within the VMF file, using the entity's comments box.

Warning.pngWarning:This entity still counts toward the edict limit for a split second until being automatically killed upon spawning. (fixed in MapbaseJabroni Brawl: Episode 3)
Cpp.pngCode Fix:Do one of the following:
PlacementTip.pngWorkaround:If this is an issue when not shipping your own mod binaries, changing the classname of this entity in your map to a non-existent entity (ex: info_target_null or editor_text) will prevent the entity from being networked, as it gets discarded as an unknown entity when it tries to spawn. It will say "Attempted to create unknown entity type info_target_null!" in the console, but this can be safely ignored.
AltNames.pngAltNames: In Mapbase Mapbase, this entity is also tied to func_null.

Keyvalues

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.

See Also