Perfect Dark Source: item weaponset: Difference between revisions
Jump to navigation
Jump to search
Note:The entity is placed like a point but spawns a model entity centered on the point. item_weaponset shouldn't be placed close to the ground as this will cause big weapons to get stuck.
mNo edit summary |
Thunder4ik (talk | contribs) m (→Entity description: Unicodifying, replaced: [[Image: → [[File:) |
||
(11 intermediate revisions by 8 users not shown) | |||
Line 1: | Line 1: | ||
{{ | {{lang|title=Perfect Dark Source: <code>item_weaponset</code>|Perfect Dark Source: item weaponset}} | ||
==Entity | |||
[[ | == Entity description == | ||
[[File:Perfect_Dark_Source_-_item_weaponset.jpg|right]] | |||
An item spawn point that uses weapon sets. It may spawn a hard coded item, it may also set the ammo on each clip of the weapon. | An item spawn point that uses weapon sets. It may spawn a hard coded item, it may also set the ammo on each clip of the weapon. | ||
{{clr}}{{note|The entity is placed like a point but spawns a model entity centered on the point. item_weaponset shouldn't be placed close to the ground as this will cause big weapons to get stuck.}} | {{clr}}{{note|The entity is placed like a point but spawns a model entity centered on the point. item_weaponset shouldn't be placed close to the ground as this will cause big weapons to get stuck.}} | ||
==Keyvalues== | == Keyvalues == | ||
* {{KV Targetname}} | |||
* {{ | |||
* '''spawnitem''' | * '''spawnitem''' | ||
Line 18: | Line 18: | ||
: <choices> Defining ''ammo'' as health, armor or whatever the item gives and ''PrimaryAmmo'' the first or only thing it gives. | : <choices> Defining ''ammo'' as health, armor or whatever the item gives and ''PrimaryAmmo'' the first or only thing it gives. | ||
:: 0: Default | :: 0: Default | ||
::: Give the default | ::: Give the default amount of ammo for the item. If ''Box of Rounds'' always gives 10 ammo then give 10 ammo. | ||
:: 1: Absolute | :: 1: Absolute | ||
::: The level designer decides an absolute value of ammo. If '''ammovalue''' is 1 give 1 ammo despite the default being 10. | ::: The level designer decides an absolute value of ammo. If '''ammovalue''' is 1 give 1 ammo despite the default being 10. | ||
Line 34: | Line 34: | ||
: ie. Primary ammo set as Default and Secondary set as 50% Relative: '''#0 0 #2 0.5''' | : ie. Primary ammo set as Default and Secondary set as 50% Relative: '''#0 0 #2 0.5''' | ||
==Inputs== | == Inputs == | ||
* '''Kill''' | * '''Kill''' | ||
: Removes this entity from the world. | : Removes this entity from the world. | ||
Line 48: | Line 47: | ||
: Causes this entity's OnUser1-4 outputs to be fired. See [[User Inputs and Outputs]]. | : Causes this entity's OnUser1-4 outputs to be fired. See [[User Inputs and Outputs]]. | ||
== Outputs == | |||
* {{O Targetname}} | |||
== See also == | |||
==See | |||
* [[Perfect Dark Source: Weapon Sets|Weapon Sets]] | * [[Perfect Dark Source: Weapon Sets|Weapon Sets]] | ||
[[Category:Perfect Dark Source Entities]] | |||
[[Category:Perfect Dark Source]] |
Latest revision as of 18:24, 7 January 2024
Entity description
An item spawn point that uses weapon sets. It may spawn a hard coded item, it may also set the ammo on each clip of the weapon.

Keyvalues
- Name (targetname) <string>[ Edit ]
- The name that other entities refer to this entity by, via Inputs/Outputs or other keyvalues (e.g.
parentname
ortarget
).
Also displayed in Hammer's 2D views and Entity Report.See also: Generic Keyvalues, Inputs and Outputs available to all entities
- spawnitem
- <choices> What item should spawn? Use Weapon Set will make use of weapon sets, the other options are hard coded spawns and will not take weapon sets into consideration.
- weaponsetslot
- <integer> The weapon set's slot number to use. Only necessary if spawnitem is Use Weapon Set.
- howtogiveammo
- <choices> Defining ammo as health, armor or whatever the item gives and PrimaryAmmo the first or only thing it gives.
- 0: Default
- Give the default amount of ammo for the item. If Box of Rounds always gives 10 ammo then give 10 ammo.
- 1: Absolute
- The level designer decides an absolute value of ammo. If ammovalue is 1 give 1 ammo despite the default being 10.
- 2: Relative
- The level designer decides a relative value of ammo (relative to the max for the item). If ammovalue is 0.5 (50%), a pistol that takes up to 50 rounds and 20 in the magazine will receive 50+20 = 70 * 0.5 = 35 rounds.
- 3: Custom Ammo String
- The level designer wants complete control of ammo. Uses customammostring to define how to give each type of ammo and the ammo values.
- 0: Default
- ammovalue
- <string> Read as a single integer or float. Skipped if howtogiveammo is Default or Custom Ammo String. Read as an integer value if Absolute, read as a float value if Relative (where 0 is 0%, 1 is 100%, 1.5 is 150%, etc). It affects all ammo sources for the item, ie. It will affect both primary and secondary ammo clips on the Superdragon.
- customammostring
- <string> Contains a parameter list. Used to give different values on items giving two or more types of ammo. Structure:
#<HowToGiveAmmo Index> <AmmoValue> #<HowToGiveAmmo Index> <AmmoValue> ...
- ie. Primary ammo set as Default and Secondary set as 50% Relative: #0 0 #2 0.5
Inputs
- Kill
- Removes this entity from the world.
- KillHierarchy
- Removes this entity and all its children from the world.
- AddOutput <string>
- 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.
- FireUser1-4
- Causes this entity's OnUser1-4 outputs to be fired. See User Inputs and Outputs.