entityguide‎ > ‎

Common Keyvalues

Introduction

This guide will usually not explain the meaning of common keyvalues, such as - but not restricted to - "targetname", "target" and "angles". Henceforth, here is a short guide to the most basic of keyvalues, assuming you already have read about Entity rendering,
so I need not explain any of the rendering-related keyvalues here anymore.

Explanation of Common Keyvalues


"Name", targetname :
This always means an identifier for the entity in question. If you name a door "douchebag" and have a button targeting "douchebag", that door will move as you push said button. Of course, naming a door "douchebag" is ill-advised, as it would not help you keep track of what the entities in your map represent and do. Many entities need no name, or behave differently depending on whether they have one or not.

"Target", target :
This always is a field to put in the name of an entity. Which function relates to it depends on the respective entity. Most will just trigger their target, while others will perform actions on their target or use it as a reference for other activities. Often, multiple entities by the same name may be targeted. Most entities need no target, but having one is essential for most logic entities and basic trigger-systems.

"Pitch Yaw Roll (X Y Z)", angles :
Where Z means Y and Y means Z, that is, when you're thinking Hammer-grid. (Hammer uses Z for height and Y for depth, while every other sane 3D-application does this the other way round; nonetheless this keyvalue description has the letters in the conventional order) This, technically, is a 3D-vector containing Euler-angles to describe either the entity's rotation or direction of effect. E.g. a func_door_rotating will use this as its initial rotation, while a trigger_push will keep its original alignment and use this for the direction of its push-effect instead. Euler-angles are a hierarchical system to determine an object's orientation in 3D-space. A yaw-value of 0 would mean the entity would face east. (right in top-down view) 90 would mean it would face north. (up in top-down-view) After yaw, pitch is applied. Think aiming up/down with your character in first person. At last, the roll-value is applied. Think your character falling over sideways in first person. Some entities, mostly point entities, do not use the angles keyvalue for any purpose.

"Delay Before Trigger (Fire)", delay:
Delay, in seconds, before trigger target. It is not delaying "KillTarget" target.

"KillTarget", killtarget :
Same as target, except that this supposedly causes the specified entity/entities to be removed from the game. Not all entities which have a target to trigger will also handle killtarget. You may want to use a trigger_relay to make sure it is working.

"Global Entity Name", globalname :
Global name of entity, allows to have one entity in the multiple maps (e.g. elevator in map1 and map2 have the same 
"Global Entity Name" which tells the engine to treat those entities as a one single entity, so all elevator settings, positions, actions e.t.c. are copied to another map in a moment of map transitions.

"Master", master :
Name of the multisource entity that (temporary) disables this entity from use. If master specified, the buttons, doors, triggers e.t.c. will be disabled (or locked- some of entities like func_button can be in 'locked' state, so they won't work until unlocking, also they will playing locked sounds and sentences). When multisource entity is triggered/beign triggering by all possible inputs, the entities which have this very multisource as a master will be unlocked. When multisource lost at least one input signal, the entities becomes locked again.

"Message", message :
Text to show on screen or name of entry located in titles.txt file to use as a on-screen title (mostly game chapters info
or credits), e.g. '
C2A5TITLE' for "Surface Tension" chapter title. Note that this file is tuned for Sven Co-op, the various parameters can be edited, however they should not be changed in any way. There is no support for custom titles.txt files.
Use prefabricated message, plain text or just use game_text entity.

"Show HUD Info", showhudinfo :
As for version 5.0, any entity supports this keyvalue. Set it to 'Yes' and entity information will be shown on-screen. Some entities support this as a spawnflag. Note that not EVERY entity can be navigate by player's view to show up info, or just that won't work at all. The detailed information which entities are supported, (and if itrequires flag or keyvalue?) are not provided.

"OnDestroy Function", ondestroyfn :
Name of the function to use from already parsed .as script files when entity is destroyed (killed) in any way. If the function belongs to namespace, you must use prefix with the namespace name (e.g. mynamespace::MyFunction) for the keyvalue.



Comments