Info null (GoldSrc): Difference between revisions
		
		
		
		
		
		Jump to navigation
		Jump to search
		
				
		
 Warning:This entity still counts toward the edict limit for a split second until being automatically killed upon spawning.
Warning:This entity still counts toward the edict limit for a split second until being automatically killed upon spawning.  Workaround:If this is an issue, do one of the following:
Workaround:If this is an issue, do one of the following:
 
		
	
|  (-added class hierarchy) | SirYodaJedi (talk | contribs)   (Can't have server-only entities in goldsus, but there's a cleaner way in multiplayer.) | ||
| Line 2: | Line 2: | ||
| {{CD|CNullEntity|goldsrc=1}} | {{CD|CNullEntity|goldsrc=1}} | ||
| {{this is a|point entity|name=info_null|engine=GoldSrc}} It will automatically remove itself on spawn. Useful for pointing [[Light spot (GoldSource Engine)|spotlights]] towards it. | {{this is a|point entity|name=info_null|engine=GoldSrc}} It will automatically remove itself on spawn. Useful for pointing [[Light spot (GoldSource Engine)|spotlights]] towards it. | ||
| {{warning|This entity still counts toward the [[edict]] limit for a split second until being automatically [[kill]]ed upon spawning. {{workaround|If this is an issue, do one of the following: | |||
| * If this is a multiplayer map, use spawnflag 2048 ("Not in Deathmatch"). This spawnflag is parsed by the engine before the entity has a chance to spawn. | |||
| * If this is a singleplayer map, add a non-existent entity (ex: {{mono|info_target_null}}) to the [[FGD]] and use that to prevent the entity from being networked, as it gets discarded as an unknown entity when it tries to spawn.}} }} | |||
| == Key Values == | == Key Values == | ||
Revision as of 07:09, 7 May 2025
|  Class hierarchy | 
|---|
| CNullEntity | 
|  subs.cpp | 
info_null  is a   point entity  available in all  GoldSrc games. It will automatically remove itself on spawn. Useful for pointing spotlights towards it.
 GoldSrc games. It will automatically remove itself on spawn. Useful for pointing spotlights towards it.
 Warning:This entity still counts toward the edict limit for a split second until being automatically killed upon spawning.
Warning:This entity still counts toward the edict limit for a split second until being automatically killed upon spawning.  Workaround:If this is an issue, do one of the following:
Workaround:If this is an issue, do one of the following:
- If this is a multiplayer map, use spawnflag 2048 ("Not in Deathmatch"). This spawnflag is parsed by the engine before the entity has a chance to spawn.
- If this is a singleplayer map, add a non-existent entity (ex: info_target_null) to the FGD and use that to prevent the entity from being networked, as it gets discarded as an unknown entity when it tries to spawn.
Key Values
- Name (targetname) <string>
- The targetname that other entities refer to this entity by.
