Generic Keyvalues, Inputs and Outputs/Keyvalues: Difference between revisions
Jump to navigation
Jump to search
1416006136 (talk | contribs) m (Added Template:Lang) |
(Updated "thinkfunction" and "classname"; Commented out: "disablex360", "hammerid", "modelindex", "globalname", "mins" and "maxs" (thankfully the "Bounding box" page describes them already), "ResponseContexts" (the page does describe it, kinda?)) |
||
Line 6: | Line 6: | ||
<!-- IF: BRUSH --> | <!-- IF: BRUSH --> | ||
{{#if:{{{brush|}}}|{{minititle|Brush}} | {{#if:{{{brush|}}}|{{minititle|Brush}} | ||
{{KV|Collisions|intn=solid|choices|Method of collision for this entity. {{ExpandBox| | |||
{{KV|Collisions|intn=solid|choices|Method of collision for this entity. | |||
:*0: None | :*0: None | ||
:*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: | :*3: Oriented Bounding Box (Use for runtime spawned brush entities meant to be rotated) {{Not in FGD}} | ||
:*4: | :*4: Oriented Bounding Box but 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}} | ||
:*6: [[VPhysics]] | :*6: [[VPhysics]]}} | ||
| }} | | }} | ||
<!-- We should make a new page for "model index"? | <!-- "mins" and "maxs" used to be here, but the "Bounding Box" page already describes it --> | ||
<!-- We should make a new page for "model index"? | |||
{{KV|Model Index|intn=modelindex|short|Given the number index from dumping the<code>cl_precacheinfo modelprecache</code>table, sets entity model to of the index. {{warning|If an entity has animations that ''will be'' played, then the set model also must have its own sequences, else the game crashes.}}|nofgd=1}} | {{KV|Model Index|intn=modelindex|short|Given the number index from dumping the<code>cl_precacheinfo modelprecache</code>table, sets entity model to of the index. {{warning|If an entity has animations that ''will be'' played, then the set model also must have its own sequences, else the game crashes.}}|nofgd=1}} | ||
--> | |||
| }} | | }} | ||
<!-- | <!-- | ||
++ Base ++ | ++ Base ++ | ||
--> | --> | ||
{{ | {{ScrollBox|title=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.}} | ||
<!-- This probably have too little use cases, we'll have to see if someone objects. | |||
{{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|[[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|[[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|[[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.}}}} | ||
<!-- This probably have too little use cases, we'll have to see if someone objects. Thankfully the page already describes its existence. | |||
{{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 | --> | ||
{{KV|[[Classname]]|intn=classname|string|Determines the characteristics of the entity ''before'' it spawns. {{tip|Changing this on runtime still has use, like making matching an entry in [[S_PreserveEnts]] will persist the entity 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}} | ||
{{KV|[[Effect flags|Effects]]|intn=effects|int|Combination of effect flags to use.|nofgd=1}} | {{KV|[[Effect flags|Effects]]|intn=effects|int|Combination of effect flags to use.|nofgd=1}} | ||
<!-- I'm not sure what the use cases of these 2 are, so ill hide them for now. | <!-- I'm not sure what the use cases of these 2 are, so ill hide them for now. Sourcemod scripters don't use "hammerid" often either | ||
{{KV|Local Time|intn=ltime|float|The local time of the entity, independent of the global clock. Used mainly for physics calculations.|nofgd=1}} | {{KV|Local Time|intn=ltime|float|The local time of the entity, independent of the global clock. Used mainly for physics calculations.|nofgd=1}} | ||
{{KV|Next Think|intn=nextthink|float|Amount of time before the entity [[Thinking|thinks]] again.|nofgd=1}} | {{KV|Next Think|intn=nextthink|float|Amount of time before the entity [[Thinking|thinks]] again.|nofgd=1}} | ||
{{KV|Hammer ID|intn=hammerid|int|The entity's unique [[Hammer]] ID that's auto-generated on map compiles. Mainly used by plugins or debugging commands (like the'''<code>ent_keyvalue</code>'''command). Run-time spawned entities don't have a Hammer ID.|nofgd=1}} | |||
--> | --> | ||
<!-- | <!-- | ||
++ Game Specifics ++ | ++ Game Specifics ++ | ||
Line 47: | Line 47: | ||
<!-- IF: L4D2 -->{{#if:{{{l4d2|}}}| | <!-- IF: L4D2 -->{{#if:{{{l4d2|}}}| | ||
{{KV|Entity Scripts|intn=vscripts|scriptlist|Space delimited list of [[VScript]] files (without file extension) that are executed after all entities have spawned. The scripts are all executed in the same script scope, later ones overwriting any identical variables and functions.|since=L4D2}} | {{KV|Entity Scripts|intn=vscripts|scriptlist|Space delimited list of [[VScript]] files (without file extension) that are executed after all entities have spawned. The scripts are all executed in the same script scope, later ones overwriting any identical variables and functions.|since=L4D2}} | ||
{{KV| | {{KV|[[Entity_Scripts#Thinker_Functions|Thinking function]]|intn=thinkfunction|string|Name of the function within this entity's script that'll be called automatically every 100 milliseconds, or a user-defined interval if the function returns a number. Avoid [[expensive]] operations in this function, as it may cause performance problems.|since=L4D2}} | ||
{{KV|[[Lag Compensation]]|intn=LagCompensate|boolean|Set to '''Yes''' to lag compensate this entity. Should be used very sparingly!|nofgd=1|since=L4D2}} | {{KV|[[Lag Compensation]]|intn=LagCompensate|boolean|Set to '''Yes''' to lag compensate this entity. Should be used very sparingly!|nofgd=1|since=L4D2}} | ||
<!-- Its 360, so it goes away | |||
{{KV|Disable for Xbox 360|intn=disableX360|bool|If this entity should automatically be given the 'Disable' input on the Xbox 360 version of Source.|nofgd=1|since=L4D2}} | {{KV|Disable for Xbox 360|intn=disableX360|bool|If this entity should automatically be given the 'Disable' input on the Xbox 360 version of Source.|nofgd=1|since=L4D2}} | ||
--> | |||
| <!-- ELSE IF: NOT BASE [CSGO] -->{{#if:{{{base|}}}|| | | <!-- ELSE IF: NOT BASE [CSGO] -->{{#if:{{{base|}}}|| | ||
{{KV|Entity Scripts|intn=vscripts|scriptlist|Space delimited list of [[VScript]] files (without file extension) that are executed after all entities have spawned. The scripts are all executed in the same script scope, later ones overwriting any identical variables and functions.|since=L4D2}} | {{KV|Entity Scripts|intn=vscripts|scriptlist|Space delimited list of [[VScript]] files (without file extension) that are executed after all entities have spawned. The scripts are all executed in the same script scope, later ones overwriting any identical variables and functions.|since=L4D2}} | ||
{{KV| | {{KV|[[Entity_Scripts#Thinker_Functions|Thinking function]]|intn=thinkfunction|string|Name of the function within this entity's script that'll be called automatically every 100 milliseconds, or a user-defined interval if the function returns a number. Avoid [[expensive]] operations in this function, as it may cause performance problems.|since=L4D2}} | ||
{{KV|[[Lag Compensation]]|intn=LagCompensate|boolean|Set to '''Yes''' to lag compensate this entity. Should be used very sparingly!|nofgd=1|since=L4D2}} | {{KV|[[Lag Compensation]]|intn=LagCompensate|boolean|Set to '''Yes''' to lag compensate this entity. Should be used very sparingly!|nofgd=1|since=L4D2}} | ||
<!-- Its 360, so it goes away | |||
{{KV|Disable for Xbox 360|intn=disableX360|bool|If this entity should automatically be given the 'Disable' input on the Xbox 360 version of Source.|nofgd=1|since=L4D2}} | {{KV|Disable for Xbox 360|intn=disableX360|bool|If this entity should automatically be given the 'Disable' input on the Xbox 360 version of Source.|nofgd=1|since=L4D2}} | ||
--> | |||
{{KV|Is Automatic-Aim Target|intn=is_autoaim_target|bool|If set to 1, this entity will slow down aiming movement for consoles and joystick controllers when the entity is under the crosshairs.|nofgd=1|since=CSGO}} | {{KV|Is Automatic-Aim Target|intn=is_autoaim_target|bool|If set to 1, this entity will slow down aiming movement for consoles and joystick controllers when the entity is under the crosshairs.|nofgd=1|since=CSGO}} | ||
| }} }}</includeonly> | | }} }} | ||
}}</includeonly> | |||
<noinclude> | <noinclude> | ||
{{documentation}} | {{documentation}} | ||
<!-- Add categories to the /doc subpage, not here --> | <!-- Add categories to the /doc subpage, not here --> | ||
</noinclude> | </noinclude> |