# touch_attachment

Touches an object attached to the bot (HUD or attachment).

The attached object is being selected by name, and the button to be clicked - by link number.

```snippet http-api-variables-OmJyUigTgO
```

```snippet http-api-input-basic-parameters-5FcVlaJbq0 action="touch_attachment"
```

```snippet http-api-input-q5yvAagqsZ
objectname | yes | the name of the attached object (exact, including all spaces)
linkset    | yes | the link number of the object to touch. See the "Comments" section below.
```

```snippet http-api-output-JAwUcmg7i7
```

Additional **resulttext** values are available:

* OBJECT NOT FOUND - The attachment object you've specified was not found
* LINK NOT FOUND - The object has been found, but it contains less prims than your "linkset" value

# Comments

## 1. Determining the link number

If your HUD has several buttons, determine the link number. Use Firestorm or a similar viewer, edit object and get the link number:  
 ![](https://nyc3.digitaloceanspaces.com/smartbots-docs/uploads/20adbcf8-a916-46eb-b77b-ad6944665550/c707ff78-c518-4776-93a7-aeaee654abf5/Get_object_linknum.jpg?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=DO801JV4MUMY3YAEJCWC%2F20261113%2Fnyc3%2Fs3%2Faws4_request&X-Amz-Date=20261113T141500Z&X-Amz-Expires=86400&X-Amz-Signature=66d59920db308f1f9d792a0b427fa7cf55019247bd0e2a2cb9d82c09eff9739c&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject " =294x264")

* The link number of the root prim is always "1".
* Single-prim objects are also have linkset=1

## 2. IMPORTANT: Data availability

Please note that bot loads all nearby prims within 10-20 seconds after startup. Thus, wait a bit after logging in your bot to issue this command.

# Examples

Bot locates the "Weapons HUD" on his screen and clicks the button at linkset 15:

```
action=touch_attachment&objectname=Weapons%20HUD&linkset=15
```