---
name: "pylonAction"
type: command
status: ok
groups: ["Vehicle Loadouts"]
arma3_since: "2.22"
locality: {"argument": "local", "effect": "local", "server_exec": false}
source: https://community.bistudio.com/wiki/pylonAction
revid: 378897
updated: 2026-08-11T14:56:32Z
---

# pylonAction

*Command · Vehicle Loadouts · Arma 3 v2.22*

Locality: arguments **local** · effect **local**

## Description

Executes an action on a specific pylon. MP effect and locality depend on the specific action.

Components and their actions:

CameraComponent
- SetLightState (arg bool, ret none)
- GetLightState (arg none, ret bool)

TransportPylonsComponent (pylon index -1, no component name, no component index)

- GetLastFiredPylonIndex (no arg, ret scalar), returns the pylon index (note this is script index, which is 1-based) that last fired the gun, or -1 if the last firing was not from a pylon (can be used in Fired eventhandler)

All pylons (Not on a component)

- animateSource - Arg local, effect global. See [animateSource](../commands/animateSource.md) pylonAction [vehicle player, 1, "animateSource", ["extendBoxSource", 1]];

## Syntax

```sqf
pylonAction [vehicle, pylon, actionPath(, arguments)]
```

**Parameters:**

- `vehicle`: [Object](../topics/Object.md) - The object carrying the pylon
- `pylon`: [Number](../topics/Number.md) or [String](../topics/String.md) - pylon index (index starts from 1) or pylon name (see [#Example 1](../commands/pylonAction.md#example-1)). Or -1 to access the TransportPylonsComponent of the vehicle
- `actionPath`: [String](../topics/String.md) - The path to reach the specific component to send the action to.

  actionPath is a "." delimited address of the component and action (like animation sources). Or (without a "." a command to the pylon directly)

  arguments and return type depends on the final action

  ActionPath examples

  "CameraComponent.0.SetLightState" with argument bool, returns nothing.

  "CameraComponent.0.GetLightState" with no argument, returns bool.

  "CameraComponent.*.SetLightState" wildcard executes the action all components of that type (if there are multiple). Note the return value will be the value of the last executed action

**Returns:** [Anything](../topics/Anything.md) - Depends on action

## See also

Arma 3: Vehicle Loadouts

<sub>Source: [BI Community Wiki — pylonAction](https://community.bistudio.com/wiki/pylonAction) (revision 378897).</sub>
