Game player equip: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
m (→‎Flags: Expanded)
(→‎Entity Description: I guessing here. Please correct if it works differently in multiplay.)
Line 2: Line 2:


==Entity Description==
==Entity Description==
This is the entity used to equip the player with a multitude of things like weapons, ammo, and items. The entity requires a few steps to use properly. First you have to tell it what to equip, and then how.
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 [[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.


Simply leaving it where you place it will equip when the player spawns. Setting the '''Use Only''' flag makes it equip the activator or all players if no activator. Now set up a [[trigger_multiple]] to equip it.  
====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.
 
You can also trigger this entity to spawn with the ''Use'' input. 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.


{{note|The default .fgd does not contain the correct input type; manually enter '''Use''' for the Input type instead. Hammer won't like it, but it is correct.}}
Setting the ''Use Only'' flag makes it equip the activating player.


==Keyvalues==
==Keyvalues==

Revision as of 23:55, 9 April 2006

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 singleplay.

You can also trigger this entity to spawn with the Use input. 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.

Setting the Use Only flag makes it equip the activating player.

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 weapons are not automatically equipped.

Inputs

This is used in conjution with the Use Only flag to trigger it.
input Use(void) : "Equip player"

Outputs

See Also