Point script template: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(point_script_template difference vs point_template)
m (FGD infobox)
Line 1: Line 1:
{{l4d2 point|point_script_template}} It is [[point_template]], but with internal elements of it readjusted for [[VScript|scripting]]. point_template relies on the map file to function properly; Trying to spawn entities with point_template created by scripts will return that it has no templates, though it will still delete its own template entities. One can work with this as if they're working on a point_template entity.
{{Ent not in fgd|nolink=1|because=it is for [[VScript|vscripts]] only, use [[point_template]] if editing a map}}
 
{{l4d2 point|point_script_template}} It is point_template, but with internal elements of it readjusted for vscripts. point_template relies on the map file to function properly; Trying to spawn entities with point_template created by scripts will return that it has no templates, though it will still delete its own template entities. One can work with this as if they're working on a point_template entity.


When [[L4D2_EMS/ConfigureHammerForEntityGroupCompilation|compiling Entity Groups]], point_template entities are converted to point_script_template.  
When [[L4D2_EMS/ConfigureHammerForEntityGroupCompilation|compiling Entity Groups]], point_template entities are converted to point_script_template.  

Revision as of 09:13, 15 March 2021

Icon-NotInFGD.png
This entity is not in the FGD by default.
It should not be put directly in a map because it is for vscripts only, use point_template if editing a map.

Template:L4d2 point It is point_template, but with internal elements of it readjusted for vscripts. point_template relies on the map file to function properly; Trying to spawn entities with point_template created by scripts will return that it has no templates, though it will still delete its own template entities. One can work with this as if they're working on a point_template entity.

When compiling Entity Groups, point_template entities are converted to point_script_template.

Keyvalues

Template 1 ([todo internal name (i)]) to Template 16 <targetname>
Targetname(s) to search for entities to template. These can be exact matches, or wildcards (*). If multiple entities are matched, all entities will be included in the template.
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

Flags

  • 1 : Don't remove template entities - Prevent entities part of the templates being removed automatically.
  • 2 : Preserve entity names (Don't do name fixup) - Disregard renaming entities to have a number postfix. See point_template flags for more info.

Inputs

ForceSpawn
Spawn an instance of the template at the original position.


Outputs

OnEntitySpawned
Fired after spawning an instance of this template.


See also