Generic Keyvalues, Inputs and Outputs/Keyvalues: Difference between revisions
Jump to navigation
Jump to search
m (grammar error) |
(mins/maxs compression + graph; parentname compression; globalname compression; Minor edit to 'Oriented Bounding Box'; Minor edit to 'Response Contexts') |
||
Line 5: | Line 5: | ||
<!-- IF: BRUSH --> | <!-- IF: BRUSH --> | ||
{{#if:{{{brush|}}}|{{minititle|Brush}} | {{#if:{{{brush|}}}|{{minititle|Brush}} | ||
{{KV|Minimum Bounding Box Size|intn=mins|vector | {{KV|Minimum Bounding Box Size|intn=mins|vector|nofgd=1}} | ||
{{KV|Maximum Bounding Box Size|intn=maxs|vector|Starting at the brush's origin, mark | {{KV|Maximum Bounding Box Size|intn=maxs|vector|Starting at the brush's origin, mark a bounding box's corner as this far away. Both are required at the same time so one side of the bounding box isn't empty.|nofgd=1}} | ||
:{{note|To translate a brush's size in Hammer to these keys, first divide the size value shown in Hammer by 2. | <!-- idk why upright won't work, and the text always shows collapse at the doc page, can't do anything about it --> | ||
:{{ExpandBox| [[File:BoundingBoxMinsMaxs.png|right|400x300px|Graph of 'mins' and 'maxs']] | side=right | noendlinebreak=1 | expandtext=View Graph | collapsetext=Hide Graph }} | |||
:{{note|To translate a brush's size in Hammer to these keys, first divide the size value shown in Hammer by 2. Apply the result to the<code>maxs</code>key, then apply the inverted variant (multiply / divide by -1) for the<code>mins</code>key.}} | |||
:{{note|If collisions is already set, it must be set back to Bounding Box (solid 2).}} | :{{note|If collisions is already set, it must be set back to Bounding Box (solid 2).}} | ||
{{KV|Collisions|intn=solid|choices|Method of collision for this entity. | {{KV|Collisions|intn=solid|choices|Method of collision for this entity. | ||
Line 13: | Line 15: | ||
:*1: BSP ([[QPhysics]]) {{Not in FGD}} {{bug|In {{portal2}}, if an entity using QPhysics collisions is hit by [[Gel]], the game will crash!}} | :*1: BSP ([[QPhysics]]) {{Not in FGD}} {{bug|In {{portal2}}, if an entity using QPhysics collisions is hit by [[Gel]], the game will crash!}} | ||
:*2: [[Bounding box|Bounding Box]] | :*2: [[Bounding box|Bounding Box]] | ||
:*3: [[Bounding box|Oriented Bounding Box]] (Use for runtime spawned | :*3: [[Bounding box|Oriented Bounding Box]] (Use for runtime spawned brush entities meant to be rotated) {{Not in FGD}} | ||
:*4: [[Bounding box|Oriented Bounding Box]], constrained to [[QAngle|Yaw]] only {{Not in FGD}} | :*4: [[Bounding box|Oriented Bounding Box]], constrained to [[QAngle|Yaw]] only {{Not in FGD}} | ||
:*5: Custom/Test (Usually no collision with anything) {{Not in FGD}} | :*5: Custom/Test (Usually no collision with anything) {{Not in FGD}} | ||
Line 26: | Line 28: | ||
{{minititle|Base}} | {{minititle|Base}} | ||
{{KV|[[targetname|Name]]|intn=targetname|string|The name that other entities use to refer to this entity.}} | {{KV|[[targetname|Name]]|intn=targetname|string|The name that other entities use to refer to this entity.}} | ||
{{KV|[[Parent]]|intn=parentname|targetname| | {{KV|[[Parent]]|intn=parentname|targetname|Maintain the same initial offset to this entity. An attachment point can also be used if separated by a comma at the end. (<code>parentname [targetname],[attachment]</code>) {{tip|Entities transition to the next map with their parents}}{{tip|{{ent|phys_constraint}}can be used as a workaround if parenting fails.}}}} | ||
{{KV|Global Entity Name|intn=globalname|string| | {{KV|Global Entity Name|intn=globalname|string| When the player transitions to a new map, entities in the new map with matching globalnames will have their previous map's states copied over to it.}} | ||
{{KV|[[Origin]] (X Y Z)|intn=origin|coordinates|The position of this entity's center in the world. Rotating entities typically rotate around their origin.{{note|Hammer does not move the entities accordingly only in the editor.}}}} | {{KV|[[Origin]] (X Y Z)|intn=origin|coordinates|The position of this entity's center in the world. Rotating entities typically rotate around their origin.{{note|Hammer does not move the entities accordingly only in the editor.}}}} | ||
{{KV|[[Pitch Yaw Roll]] (X Y Z)|intn=angles|angle|This entity's orientation in the world. Pitch is rotation around the Y axis, yaw is the rotation around the Z axis, roll is the rotation around the X axis.{{note|This works on brush entities, although Hammer doesn't show the new angles.}}}} | {{KV|[[Pitch Yaw Roll]] (X Y Z)|intn=angles|angle|This entity's orientation in the world. Pitch is rotation around the Y axis, yaw is the rotation around the Z axis, roll is the rotation around the X axis.{{note|This works on brush entities, although Hammer doesn't show the new angles.}}}} | ||
{{KV|[[ResponseContext|Response Contexts]]|intn=ResponseContext|string|Pre-defined response system contexts; Format is <code>key:value,key:value,...</code>and so on. {{tip|Can also be [[filter_activator_context|filtered for or against!]]}}}} | {{KV|[[ResponseContext|Response Contexts]]|intn=ResponseContext|string|Pre-defined response system contexts; Format is <code>[key]:[value],[key]:[value],...</code>and so on. {{tip|Can also be [[filter_activator_context|filtered for or against!]]}}}} | ||
{{KV|[[Classname]]|intn=classname|string|Determines the characteristics of the entity ''before'' it spawns. {{tip|Changing classnames using the{{ent|AddOutput}}input can still influence the game's code, like making the classname match one element in the [[S_PreserveEnts]] list will make the entity persists on new rounds!}}|nofgd=1}} | {{KV|[[Classname]]|intn=classname|string|Determines the characteristics of the entity ''before'' it spawns. {{tip|Changing classnames using the{{ent|AddOutput}}input can still influence the game's code, like making the classname match one element in the [[S_PreserveEnts]] list will make the entity persists on new rounds!}}|nofgd=1}} | ||
{{KV|[[Flag|Flags]]|intn=spawnflags|integer|Toggles exclusive features of an entity, its specific number is determined by the combination of flags added.|nofgd=1}} | {{KV|[[Flag|Flags]]|intn=spawnflags|integer|Toggles exclusive features of an entity, its specific number is determined by the combination of flags added.|nofgd=1}} |