InventoryAddCommand

Extends: ESCBaseCommand < Node

Description

inventory_add item

Adds an item to the inventory. If the player is picking up an object, you may want to use this command in conjunction with the set_active command so that the object ‘disappears’ from the scene as it’s added to the inventory.

Parameters

  • item: Global ID of the ESCItem to add to the inventory

@ESC

Method Descriptions

configure

func configure() -> ESCCommandArgumentDescriptor

Return the descriptor of the arguments of this command

validate

func validate(arguments: Array)

Validate whether the given arguments match the command descriptor

run

func run(command_params: Array) -> int

Run the command

interrupt

func interrupt()

Function called when the command is interrupted.