# gameObject

## Description

A `GameObject` is any in-game item or structure that the player or NPCs can interact with. This includes things like weapons, doors, vending machines, lootable containers, and even some environmental elements.

## Functions

#### RegisterInputListener(listener: handle:IScriptable, opt name: CName) -> Void

`name` (of action) is allowed but using known object (e.g. \[PlayerPuppet]) as `listener` is a source of potential issues. Mods should always declare and use a custom listener object, like in [this example](https://discord.com/channels/717692382849663036/867332475553054740/888415535992291379).


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://wiki.redmodding.org/nativedb-documentation/classes/gameobject.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
