{"name":"pylonAction","title":"pylonAction","type":"command","url":"https://community.bistudio.com/wiki/pylonAction","revid":378897,"updated":"2026-08-11T14:56:32Z","groups":["Vehicle Loadouts"],"status":"ok","games":{"arma3":"2.22"},"since":"arma3 2.22","arma3_since":"2.22","locality":{"argument":"local","effect":"local"},"description":"Executes an action on a specific pylon. MP effect and locality depend on the specific action.\n\nComponents and their actions:\nCameraComponent\n\n- SetLightState (arg bool, ret none)\n- GetLightState (arg none, ret bool)\n\nTransportPylonsComponent (pylon index -1, no component name, no component index)\n\n- 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)\n\nAll pylons (Not on a component)\n\n- animateSource - Arg local, effect global. See animateSource pylonAction [vehicle player, 1, \"animateSource\", [\"extendBoxSource\", 1]];","syntaxes":[{"syntax":"pylonAction [vehicle, pylon, actionPath(, arguments)]","params":[{"name":"vehicle","type":"Object","description":"The object carrying the pylon","type_expr":"Object"},{"name":"pylon","type":"Number or String","description":"pylon index (index starts from 1) or pylon name (see Example 1). Or -1 to access the TransportPylonsComponent of the vehicle","type_expr":"Number | String"},{"name":"actionPath","type":"String","description":"The path to reach the specific component to send the action to.\nactionPath is a \".\" delimited address of the component and action (like animation sources). Or (without a \".\" a command to the pylon directly)\narguments and return type depends on the final action\nActionPath examples\n\"CameraComponent.0.SetLightState\" with argument bool, returns nothing.\n\"CameraComponent.0.GetLightState\" with no argument, returns bool.\n\"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","type_expr":"String"}],"returns":{"type":"Anything","type_expr":"Anything","description":"Depends on action"},"form":"unary","right":{"text":"[vehicle, pylon, actionPath(, arguments)]"}}],"see_also":["Arma 3: Vehicle Loadouts"]}