Game player equip: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
m (→‎Entity Description: minor cleanup)
Line 4: Line 4:
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.
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.


To properly use the entity you have to turn smart edit off, now you can add a new keyvalue. The name should be the item, say [[weapon_ar2]]. Then the value should be the number of them, say 1. Now the game_player_equip wil equip 1 combine assualt 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. Use only makes it equip the activator or all players if no activator. Now set up a [[trigger_multiple]] to equip it. A problem occurs in that the defualt .fgd does not contain the correct trigger, simply type in '''Use''' instead. Hammer won't like it, but it is correct.
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. A problem occurs in that 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.


==Keyvalues==
==Keyvalues==

Revision as of 07:52, 1 March 2006

Template:Wrongtitle

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.

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.

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. A problem occurs in that 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.

Keyvalues

Flags

  • 1 : Use Only
Makes it so that the entity is only triggered and cannot be picked up.

Inputs

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

Outputs

See Also