Skip to main content

player_hasinventory

player_hasinventory icon
Point entityPorted from Featureful

A player_hasinventory checks whether the player who triggers it carries an inventory item, and fires Pass Target if they have it and Fail Target if they don't. As the Master of a door, a button or a trigger, it makes that entity work only for a player who carries the item. Items come from item_pickup and player_inventory.

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

Attributes​

The entity also has these common keys:

KeyDescriptionDefault
Item nameitem_name

Names the item to check for, by its Item name.

Pass Targetpass_target

Fires this target if the player has the item. With Shared, it fires this target if the team's shared items hold the item.

Fail Targetfail_target

Fires this target if the player doesn't have the item, or with Shared, if the shared items don't hold it.

Flags​

4Shared

It checks the team's shared items instead, and it answers any activator, the world too. Without this flag, it only answers an alive player

See also​

Changes since 1.38​

  • player_hasinventory is new in SBO 2.1.0