> For the complete documentation index, see [llms.txt](https://wiki.thescriptersguild.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://wiki.thescriptersguild.com/scripting/nodes/inventory/switch-to-first-weapon-of-type.md).

# Switch To First Weapon Of Type

![](https://692276616-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FN06Vv6nlwviUQ4hI2Kkd%2Fuploads%2Fgit-blob-6a56bcbb1aa846180f98614bb17dd56e58ef6cb3%2Fswitch-to-first-weapon-of-type.png?alt=media)

## Description

Force the Player to switch to the first weapon in their inventory that matches the Weapon Type. Has no effect if the Player already has that weapon equipped or does not have a matching weapon.

## Node Type

Nodes fall into two basic categories: Data and Execution. This node Executes a function directly in the node string.

## Inputs

| Input       | Type        | Required | Description                                |
| ----------- | ----------- | -------- | ------------------------------------------ |
| Player      | Object      | Yes      | Which player to switch weapons for.        |
| Weapon Type | Weapon Type | Yes      | Weapon Type to switch to if player has it. |

## Outputs

| Output | Type | Description |
| ------ | ---- | ----------- |
| N/A    | N/A  | N/A         |

\
\
**Contributors**

AddiCt3d 2CHa0s
