Point script template: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(Read this for a while, reworded things)
m (turned things into templates)
Line 1: Line 1:
{{Ent not in fgd|nolink=1|because=it is for [[VScript|vscripts]] only, use [[point_template]] if editing a map}}
{{Ent not in fgd|nolink=1}}


{{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. Otherwise, this entiy can be taken the same as working on a point_template entity.
{{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.
 
Otherwise, this entity can be taken the same as working on a point_template entity, so the quirks such as point_template's name fixup behaviour, will need to be taken into account.


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.  


== Keyvalues ==
== Keyvalues ==
{{KV|Template 1|to=Template 16|target_destination| [[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.}}
{{KV PointTemplate}}
{{KV Targetname}}


== Flags ==
== Flags ==
* 1 : Don't remove template entities - Prevent entities part of the templates being removed automatically.
{{Fl PointTemplate}}
* 2 : Preserve entity names (Don't do name fixup) -  Disregard renaming entities to have a number postfix. See [[point_template#Flags|point_template flags]] for more info.


== Inputs ==
== Inputs ==
{{IO|ForceSpawn|Spawn an instance of the template at the original position.}}
{{I PointTemplate}}
{{I Targetname}}


== Outputs ==
== Outputs ==
{{IO|OnEntitySpawned|Fired after spawning an instance of this template.}}
{{O PointTemplate}}
{{O Targetname}}
 
== FGD Code ==
{{todo|Script entities are seen in TLS .lmp files, so it may be wise to let mappers see it while inspecting them in Hammer.}}


== See also ==
== See also ==
* [[point_template]] - Non script version of this entity
* [[List_of_L4D2_Script_Functions#CPointScriptTemplate|CPointScriptTemplate VScript Functions]]
* [[List_of_L4D2_Script_Functions#CPointScriptTemplate|CPointScriptTemplate VScript Functions]]
* [[List_of_L4D2_Script_Functions#CPointTemplate|CPointTemplate VScript Functions]]
* [[List_of_L4D2_Script_Functions#CPointTemplate|CPointTemplate VScript Functions]]

Revision as of 00:24, 19 March 2021

Icon-NotInFGD.png
This entity is not in the FGD by default.
It should not be put directly in 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.

Otherwise, this entity can be taken the same as working on a point_template entity, so the quirks such as point_template's name fixup behaviour, will need to be taken into account.

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

Keyvalues

Template 1 (Template01) 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.


Flags

Template:Fl PointTemplate

Inputs

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


Outputs

Template:O PointTemplate

FGD Code

Todo: Script entities are seen in TLS .lmp files, so it may be wise to let mappers see it while inspecting them in Hammer.

See also