Difference between revisions of "Point template"

From Valve Developer Community
Jump to: navigation, search
(Entity Description)
(ordronricc)
Line 1: Line 1:
 +
acpaspas
 
{{wrongtitle|title=point_template}}
 
{{wrongtitle|title=point_template}}
 
==Entity Description==
 
==Entity Description==

Revision as of 00:17, 27 January 2008

acpaspas Template:Wrongtitle

Entity Description

Turns an entity, or set of entities, into a single template that can be instanced anywhere, and multiple times.

If there are interdependencies (entity I/O, hierarchy, or other name references) between the entities in the template, the entities in the template will have their names changed and the interdependencies will be reconnected to the changes names. The name change format is as follows: '<original name>&0000', where the 0000 will be replaced with the current global template instance, so wildcard searches for '<original name>*' will still find them.

If you don't want the name fixup to happen, because you're only spawning the template once, or you want inputs to trigger all instances of the template, check the 'Preserve entity names' spawnflag.

If used to spawn on its own, this entity spawns the entity/entities at the position of the original template(s) (and not the point_template entity itself). To spawn the template in other places, use an env_entity_maker.


Notes on name fixup

Name fixing is only performed on the outputs of template entities (the entities being spawned). The outputs of the point_template are not fixed, and neither are the outputs of other objects refering to template entities.

The special targetnames (see the targetname article) work on spawned objects, so a trigger_multiple with an output to !activator can be used to effect individual spawned objects. Wildcards can refer to all entities spawned by a fix-up-enabled point_template.

With fix-up on, the first entity spawned will be named with &0002. If the Do not remove template spawnflag of the point_template is enabled, the unremoved template entity will have its name fixed with number &0001.


Tutorial

A tutorial has been created for respawning items using this entity.

Keyvalues

<target_destination>

Flags

  • 1 : Don't remove template entities
  • 2 : Preserve entity names (Don't do name fixup)

Inputs

Spawn an instance of the template at the original position.

Outputs

Fired after spawning an instance of this template.


See also

  • env_entity_maker: automatic respawning and/or spawning at a different location
  • npc_maker: an alternative spawning entity, also with optional automatic respawning