Game player equip: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
m (minoro)
Line 1: Line 1:
{{wrongtitle|title=game_player_equip}}
{{wrongtitle|title=game_player_equip}}


==Entity Description==
== Entity description ==
Spawns one or several entities at the location of the player. Used in multiplayer games to automatically equip the players with standard gear on map spawn, and can be used to equip the player(s) with a multitude of things like weapons, ammo and items.
Spawns one or several entities at the location of the player. Used in multiplayer games to automatically equip the players with standard gear on map spawn, and can be used to equip the player(s) with a multitude of things like weapons, ammo and items.
In HL2:SP this entity must instead be triggered to spawn.
In HL2:SP this entity must instead be triggered to spawn.
Line 7: Line 7:
The entity requires a few steps to use properly. First you have to tell it what to equip, and then how.
The entity requires a few steps to use properly. First you have to tell it what to equip, and then how.


====What to equip====
==== What to equip ====
To properly use the entity, turn [[Hammer_Object_Properties_Dialog#SmartEdit|SmartEdit]] off and add new keyvalues manually. The key name should be the item; the value should be the number of that item to equip. For example, a keyvalue pair of ''[[weapon_ar2]]'' and ''1'' will make the game_player_equip equip the player with 1 Combine assault rifle.
To properly use the entity, turn [[Hammer_Object_Properties_Dialog#SmartEdit|SmartEdit]] off and add new keyvalues manually. The key name should be the item; the value should be the number of that item to equip. For example, a keyvalue pair of ''[[weapon_ar2]]'' and ''1'' will make the game_player_equip equip the player with 1 Combine assault rifle.


====Activation====
==== Activation ====
In multiplayer, simply having this entity anywhere in a map will automatically activate it every time a player is spawned into the map, for the spawning player. This is not supported in singleplay.
In multiplayer, simply having this entity anywhere in a map will automatically activate it every time a player is spawned into the map, for the spawning player. This is not supported in single-player.


You can also trigger this entity to spawn with the ''Use'' input, making it spawn at the location of the activating player only. (To prevent a triggerable ''game_player_equip'' from also being activated at player spawn in multiplay, set the ''Use Only'' flag.) The default .fgd does not contain this input type, so you must manually enter <code>Use</code> into the Input type field instead. Hammer won't register this as a correct input, displaying it in red, but it is correct.
You can also trigger this entity to spawn with the ''Use'' input, making it spawn at the location of the activating player only. (To prevent a triggerable ''game_player_equip'' from also being activated at player spawn in multiplayer, set the ''Use Only'' flag.) The default .fgd does not contain this input type, so you must manually enter <code>Use</code> into the Input type field instead. Hammer won't register this as a correct input, displaying it in red, but it is correct.
 
==Keyvalues==


== Keyvalues ==
* {{kv targetname}}
* {{kv targetname}}
* '''master'''
* '''master'''
: <target_destination> Team Master (Obsolete) - Legacy support: The name of a master entity. If the master hasn't been activated, this entity will not activate.
: <target_destination> Team Master (Obsolete) - Legacy support: The name of a master entity. If the master hasn't been activated, this entity will not activate.


==Flags==
== Flags ==
 
* 1 : Use Only
* 1 : Use Only
: Makes it so that the specified entities are not automatically spawned.
: Makes it so that the specified entities are not automatically spawned.


==Inputs==
== Inputs ==
 
* {{i targetname}}
* {{i targetname}}


Line 33: Line 30:
: Spawn the keyvalue entities at the player location. ''Use Only'' is not required to be enabled for this to function.
: Spawn the keyvalue entities at the player location. ''Use Only'' is not required to be enabled for this to function.


==Outputs==
== Outputs ==
 
* {{o targetname}}
* {{o targetname}}


==See Also==
== See also ==
 
* [[List of entities#Weapon Entities|Weapons]]
* [[List of entities#Weapon Entities|Weapons]]
* [[List of entities#Item Entities|Items]]


* [[List of entities#Item Entities|Items]]
[[Category:Entities]]
[[Category:Entities]]

Revision as of 00:49, 3 January 2008

Template:Wrongtitle

Entity description

Spawns one or several entities at the location of the player. Used in multiplayer games to automatically equip the players with standard gear on map spawn, and can be used to equip the player(s) with a multitude of things like weapons, ammo and items. In HL2:SP this entity must instead be triggered to spawn.

The entity requires a few steps to use properly. First you have to tell it what to equip, and then how.

What to equip

To properly use the entity, turn SmartEdit off and add new keyvalues manually. The key name should be the item; the value should be the number of that item to equip. For example, a keyvalue pair of weapon_ar2 and 1 will make the game_player_equip equip the player with 1 Combine assault rifle.

Activation

In multiplayer, simply having this entity anywhere in a map will automatically activate it every time a player is spawned into the map, for the spawning player. This is not supported in single-player.

You can also trigger this entity to spawn with the Use input, making it spawn at the location of the activating player only. (To prevent a triggerable game_player_equip from also being activated at player spawn in multiplayer, set the Use Only flag.) The default .fgd does not contain this input type, so you must manually enter Use into the Input type field instead. Hammer won't register this as a correct input, displaying it in red, but it is correct.

Keyvalues

<target_destination> Team Master (Obsolete) - Legacy support: The name of a master entity. If the master hasn't been activated, this entity will not activate.

Flags

  • 1 : Use Only
Makes it so that the specified entities are not automatically spawned.

Inputs

Spawn the keyvalue entities at the player location. Use Only is not required to be enabled for this to function.

Outputs

See also