Skip to main content

item_pickup

item_pickup icon
Point entityPorted from FeaturefulSevenKewp

An item_pickup is an inventory item in the world, such as a keycard, which a player picks up and carries. The map checks for it with a player_hasinventory and can take it away again with a player_inventory.

Each player sees their items in a row of icons on the left of the HUD, and the items the whole team shares follow after "TEAM".

The inventory row: a red keycard and three fuses, then the team's blue keycard after TEAM

The inventory row with keycards and fuses

The item_pickup you place is the item itself. While a player carries it, it is hidden and remembers who holds it, so it can always go back to where you placed it, which means it is never lost and never exists twice.

Attributes​

The entity also has these common keys:

KeyDescriptionDefault
Object Hint TemplateFeaturefulobjecthint

Shows brackets around the object for players near it. Within Hint Distance, the brackets are faint and in the HUD color. When the player is close enough to use the object and looks at it, the brackets take the color of the choice.

  • None (empty) - No brackets
  • button - Yellow, and orange while a master locks the object
  • charger - Green, and red while the charger is empty
  • eyescanner - Yellow
  • pickup - Yellow
Default None (empty)
Hint Distanceobjecthint_distance

Sets how far from the player's eyes the faint brackets show, in units, up to 4096. The object must be in front of the player and in sight.

If you leave this key empty or set 0, the distance is 512 units.

Colormapcolormap

Colors the parts of the model that a player model colors with the player's chosen top and bottom colors. A model without such parts doesn't change.

The 81 choices
  • Red top, red bottom (0)
  • Red top, orange bottom (5120)
  • Red top, yellow bottom (10240)
  • Red top, green bottom (17920)
  • Red top, light green bottom (28160)
  • Red top, light blue bottom (33280)
  • Red top, blue bottom (40960)
  • Red top, purple bottom (51200)
  • Red top, pink bottom (57600)
  • Orange top, red bottom (20)
  • Orange top, orange bottom (5140)
  • Orange top, yellow bottom (10260)
  • Orange top, green bottom (17940)
  • Orange top, light green bottom (28180)
  • Orange top, light blue bottom (33300)
  • Orange top, blue bottom (40980)
  • Orange top, purple bottom (51220)
  • Orange top, pink bottom (57620)
  • Yellow top, red bottom (40)
  • Yellow top, orange bottom (5160)
  • Yellow top, yellow bottom (10280)
  • Yellow top, green bottom (17960)
  • Yellow top, light green bottom (28200)
  • Yellow top, light blue bottom (33320)
  • Yellow top, blue bottom (41000)
  • Yellow top, purple bottom (51240)
  • Yellow top, pink bottom (57640)
  • Green top, red bottom (70)
  • Green top, orange bottom (5190)
  • Green top, yellow bottom (10310)
  • Green top, green bottom (17990)
  • Green top, light green bottom (28230)
  • Green top, light blue bottom (33350)
  • Green top, blue bottom (41030)
  • Green top, purple bottom (51270)
  • Green top, pink bottom (57670)
  • Light green top, red bottom (110)
  • Light green top, orange bottom (5230)
  • Light green top, yellow bottom (10350)
  • Light green top, green bottom (18030)
  • Light green top, light green bottom (28270)
  • Light green top, light blue bottom (33390)
  • Light green top, blue bottom (41070)
  • Light green top, purple bottom (51310)
  • Light green top, pink bottom (57710)
  • Light blue top, red bottom (130)
  • Light blue top, orange bottom (5250)
  • Light blue top, yellow bottom (10370)
  • Light blue top, green bottom (18050)
  • Light blue top, light green bottom (28290)
  • Light blue top, light blue bottom (33410)
  • Light blue top, blue bottom (41090)
  • Light blue top, purple bottom (51330)
  • Light blue top, pink bottom (57730)
  • Blue top, red bottom (160)
  • Blue top, orange bottom (5280)
  • Blue top, yellow bottom (10400)
  • Blue top, green bottom (18080)
  • Blue top, light green bottom (28320)
  • Blue top, light blue bottom (33440)
  • Blue top, blue bottom (41120)
  • Blue top, purple bottom (51360)
  • Blue top, pink bottom (57760)
  • Purple top, red bottom (200)
  • Purple top, orange bottom (5320)
  • Purple top, yellow bottom (10440)
  • Purple top, green bottom (18120)
  • Purple top, light green bottom (28360)
  • Purple top, light blue bottom (33480)
  • Purple top, blue bottom (41160)
  • Purple top, purple bottom (51400)
  • Purple top, pink bottom (57800)
  • Pink top, red bottom (225)
  • Pink top, orange bottom (5345)
  • Pink top, yellow bottom (10465)
  • Pink top, green bottom (18145)
  • Pink top, light green bottom (28385)
  • Pink top, light blue bottom (33505)
  • Pink top, blue bottom (41185)
  • Pink top, purple bottom (51425)
  • Pink top, pink bottom (57825)
Modelmodel

Sets the model of the item. The model and the Pickup sound are loaded with the map, so a trigger_changevalue that changes them later does nothing.

If you leave this key empty, it is the security card of Half-Life.

Default models/w_security.mdl
Item nameitem_name

Sets the name of the item, up to 31 characters, such as keycard_red, and every check and every player_inventory names the item by it.

If you leave this key empty, nobody can take the item.

HUD iconitem_icon

Picks the icon of the item in the inventory row, as a name from sprites/hud.txt. You can also type any other name in hud.txt, and a name it doesn't have shows the key.

  • Key (inv_key)
  • Red keycard (inv_card_red)
  • Blue keycard (inv_card_blue)
  • Yellow keycard (inv_card_yellow)
Default Key (inv_key)
Countcount

Sets how many the item counts for, from 1 up to 32767.

Default 1
Collect limitcollect_limit

Sets how many of the item a player, or the team with Shared, can hold. A player can't take the item if that would make them hold more than this many, and 0 means no limit.

Default 0
Return timereturn_timelimit

Sets how many seconds a dropped item lies untouched before it goes back to where you placed it, and with 0, it goes straight back when its holder dies.

Default 45
Keep on deathholder_keep_on_death

Sets whether the holder keeps the item when they die.

  • No (0) - The item drops where the holder died
  • Yes (1) - The holder keeps the item when they die or are stripped, so in Bounty Killer and Battle Royale they respawn with it. It still goes back at a round restart or when they leave
Default No (0)
Reset at round startround_reset

For a shared item only, sets whether the team loses it at each round start. Personal items always go back.

  • No (0) - The team keeps the item
  • Yes (1) - The item is taken back from the team and put on its spot at each round start
Default No (0)
Pickup soundnoise

Sets the sound the player hears when they pick up the item.

Default items/gunpickup2.wav
Pickup messagemessage

Sets a message shown to the player who takes the item.

Flags​

4Shared

The item goes into one pool for the whole team. Any alive player can use it, and so can the world, such as a trigger_relay or the round hook game_round_start, and shared items stay across rounds

128TOUCH onlyFeatureful

Players pick the item up by walking into it, the normal way. If you set USE only too, this flag wins

256USE onlyFeatureful

Players must press their use key on the item to pick it up, and walking into it does nothing

What happens to a personal item​

WhenWhat happens to the item
Its holder diesIt drops where they died, and any alive player can take it there. Untouched for Return time, or out of reach (in a wall, the sky, lava or slime), it goes back to where you placed it. With Keep on death they keep it instead.
Its holder is stripped (round start, player_weaponstrip)It goes back to its place, unless Keep on death is set
Its holder leaves, or becomes a spectator or the Game MasterIt goes back to its place at once
A round restartsEvery personal item goes back to its place before the players spawn
A player_inventory takes itIt is used up: hidden until the next round restart puts it back

Deaths and players who leave don't change shared items, and with Reset at round start, the team loses a shared item at each round start, and it goes back to its spot.

Checking for an item​

A player_hasinventory with the same Item name checks for the item, and as the Master of a door or a button, it only lets that entity work for a player who carries the item.

Room 1 of the inventory test map: the door locked while the red keycard is on its stand, the card in the HUD's inventory row after the pickup, and the door open for the player who carries it

A door that opens only for the player who carries the red keycard

Only a player_hasinventory that has the flag Shared too finds a shared item, and a player_inventory that takes the item away uses it up.

Notes​

  • Only alive players pick items up
  • A player holds at most 16 different items, the team pool holds 16 more, and counts go from 0 up to 32767
  • When the map changes, every item is cleared, so a player who reconnects starts with nothing

See also​

Changes since 1.38​

  • item_pickup is new in SBO 2.1.0