game_player_equip
Last edited 5 years ago2019-06-01 22:12:32 UTC
- Wiki
- View Page
-
You are viewing an older revision of this wiki page. The current revision may be more detailed and up-to-date.
Click here to see the current revision of this page.
The game_player_equip entity allows you to provide the player with specific items when it is triggered. In deathmatch games, this entity can also be used to give items to players upon spawning.
Attributes
- Name (targetname) - Name is a general attribute used to identify entities.
- Team Master (master) - This can be used to limit which team (in a deathmatch game) can receive the items. Takes the name of a game_team_master.
Flags
- Use Only (1) - If enabled, only triggering the game_player_equip will cause it to dispense items. This will prevent items being given upon spawning in a deathmatch game. Only the player who caused the trigger will receive items.
Notes
- To specify what items you want the game_player_equip to dispense, you must turn Smart Edit mode off and add attributes. Enter the item's name as the key, and how many of that item you want to give as the value. For example, a key of "weapon_handgrenade" with a value of "2" will equip the player with 10 grenades (as each weapon_handgrenade gives 5 grenades).
- Do not use an automatic trigger (trigger_auto) to fire this entity when on "Use Only". The engine could not identify who activated the entity nor give the item to anyone, and thus it will result in a crash.
- This entity is not limited to weapons. Weapons, ammo, and items can all be used, including item_battery and item_healthkit.
- In fact, other entities will work as well, including monsters. As you don't have a way to trigger or specify the properties of these entities, using a game_player_equip in that way is likely not useful, but it's worth noting that it is possible.
- The items dispensed are not given directly to the player's inventory — the items are, in fact, spawned on top of the player. Generally, the effect is the same, but it should be noted that if a player is at full capacity for a particular item, the player will not pick up an item of that type when it is spawned. If not used carefully, this could result in items being strewn around the map in an untidy and possibly unbalancing manner.
3 Comments
You must log in to post a comment.
You can login or register a new account.
game_playerspawn
to automatically trigger this entity at the start of the map.game_playerspawn
is the targetname you assign to this entity, or any other entity of any classname.the game fires entities of the name
game_playerspawn
on your behalf every time you spawn in a map. another example is if you have agame_text
entity with the namegame_playerspawn
you'll see thegame_text
's text when you spawn.also,
game_*
entities in general are added sometime after retail release so this entity, and the game engine firinggame_playerspawn
would be absent on early WON versions or earlier SDKs.