Info item position: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(Created page with information from hammer's "help" window. Some formatting has to be donw with the "add output" input. I can't seem to get the entire string to work.)
 
No edit summary
 
(11 intermediate revisions by 7 users not shown)
Line 1: Line 1:
{{l4d2 point|info_item_position}} An entity that represents a possible item location in a map. Scripts can search for these entities and use them to spawn objects for different game modes
{{LanguageBar}}
<onlyinclude>
{{CD|CInfoItemPosition}}
{{This is a|point entity|name=info_item_position|game=Left 4 Dead 2}} An entity that represents a possible item location in a map. Scripts can search for these entities and use them to spawn objects for different game modes
 
== Vscript ==
See [[Left_4_Dead_2/Scripting/Script_Functions#CInfoItemPosition]]
 
== Keyvalues ==
== Keyvalues ==
{{KV|Name|string|The name that other entities refer to this entity by.}}
{{KV Targetname}}
{{KV|Entity Scripts|string|Name(s) of script files that are executed after all entities have spawned.}}
{{KV|Helper Model|intn=model|studio|A model used to represent this entity.}}
{{KV|Script think function|string|Name of a function in this entity's script scope which will be called automatically.}}
{{KV|Group|intn=group|int|Group Number.}}
{{KV|Pitch Yaw Roll (Y Z X)|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.}}
{{KV|Rarity|intn=rarity|choices|Item rarity at this location.}}
{{KV|Parent|target_destination|The name of this entity's parent in the movement hierarchy. Entities with parents move with their parent.}}
:*0: Common
{{KV|Helper Model|studio|A model used to represent this entity.}}
:*1: Occasional
{{KV|Group|int|Group Number.}}
:*2: Scarce
{{KV|Rarity rarity|choices|Item rarity at this location.}}
{{KV|Replace|intn=replace01|to=Replace|intn2=replace10|string|This is a replacement parameter. It goes in the form of $variable value. All entities inside of the spawn group that have $variable somewhere will be replaced with the value contents. Example: $color 255 0 0.}}
{{KV|Replace|string|This is a replacement parameter. It goes in the form of $variable value. All entities inside of the spawn group that have $variable somewhere will be replaced with the value contents. Example: $color 255 0 0}}


== Inputs ==
== Inputs ==
{{IO|RunScriptFile|Execute a game script file from disk.|param=script}}
{{I|SetGroup|Set the group number.}}
{{IO|RunScriptCode|Execute a string of script source code|param=string}}
{{I|SetRarity|Set the rarity.}}
{{IO|Kill|Removes this entity from the world.}}
{{IO|KillHierarchy|Removes this entity and all its children from the world.}}
{{IO|AddOutput|Adds an entity I/O connection to this entity. Format: <output name> <targetname>:<inputname>:<parameter>:<delay>:<max times to fire (-1 == infinite)>. Very dangerous, use with care.|param=string}}
{{IO|FireUser1 to FireUser4|Fire the OnUser outputs; see [[User Inputs and Outputs|User Inputs and Outputs]].}}
{{IO|Strip|Removes all weapons.}}
{{IO|StripActiveWeapon|Removes the active weapon.}}
{{IO|StripWeaponByClassname|string|Removes a weapon by classname, eg 'weapon_dieselcan'}}
 
 
== Outputs ==
{{O Targetname}}
</onlyinclude>

Latest revision as of 11:24, 11 October 2024

English (en)中文 (zh)Translate (Translate)
C++ Class hierarchy
CInfoItemPosition
CPointEntity
CBaseEntity

info_item_position is a point entity available in Left 4 Dead 2 Left 4 Dead 2. An entity that represents a possible item location in a map. Scripts can search for these entities and use them to spawn objects for different game modes

Vscript

See Left_4_Dead_2/Scripting/Script_Functions#CInfoItemPosition

Keyvalues

Name (targetname) <string>[ Edit ]
The name that other entities refer to this entity by, via Inputs/Outputs or other keyvalues (e.g. parentname or target).
Also displayed in Hammer's 2D views and Entity Report.
See also:  Generic Keyvalues, Inputs and Outputs available to all entities

Helper Model (model) <model path>
A model used to represent this entity.
Group (group) <integer>
Group Number.
Rarity (rarity) <choices>
Item rarity at this location.
  • 0: Common
  • 1: Occasional
  • 2: Scarce
Replace (replace01) to Replace (replace10) <string>
This is a replacement parameter. It goes in the form of $variable value. All entities inside of the spawn group that have $variable somewhere will be replaced with the value contents. Example: $color 255 0 0.

Inputs

SetGroup
Set the group number.
SetRarity
Set the rarity.