{"name":"pylonAction","operator":null,"title":"pylonAction","type":"command","url":"https://community.bistudio.com/wiki/pylonAction","revid":378897,"updated":"2026-08-11T14:56:32Z","groups":["Vehicle Loadouts"],"status":"ok","replaced_by":[],"games":[{"game":"arma3","name":"Arma 3","version":"2.22"}],"since":{"game":"arma3","name":"Arma 3","version":"2.22"},"arma3_since":"2.22","branch":null,"locality":{"argument":"local","effect":"local","server_exec":false},"exec":null,"description":"Executes an action on a specific pylon. MP effect and locality depend on the specific action.\n\nComponents and their actions:\n\nCameraComponent\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)]","since":null,"effect":null,"exec":null,"params":[{"name":"vehicle","type":"Object","optional":false,"default":null,"description":"The object carrying the pylon","types":["Object"],"since":null,"text":"vehicle: Object - The object carrying the pylon"},{"name":"pylon","type":"Number or String","optional":false,"default":null,"description":"pylon index (index starts from 1) or pylon name (see #Example 1). Or -1 to access the TransportPylonsComponent of the vehicle","types":["Number","String"],"since":null,"text":"pylon: Number or String - pylon index (index starts from 1) or pylon name (see #Example 1). Or -1 to access the TransportPylonsComponent of the vehicle"},{"name":"actionPath","type":"String","optional":false,"default":null,"description":"The path to reach the specific component to send the action to.\n\nactionPath is a \".\" delimited address of the component and action (like animation sources). Or (without a \".\" a command to the pylon directly)\n\narguments and return type depends on the final action\n\nActionPath examples\n\n\"CameraComponent.0.SetLightState\" with argument bool, returns nothing.\n\n\"CameraComponent.0.GetLightState\" with no argument, returns bool.\n\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","types":["String"],"since":null,"text":"actionPath: String - The path to reach the specific component to send the action to.\n\nactionPath is a \".\" delimited address of the component and action (like animation sources). Or (without a \".\" a command to the pylon directly)\n\narguments and return type depends on the final action\n\nActionPath examples\n\n\"CameraComponent.0.SetLightState\" with argument bool, returns nothing.\n\n\"CameraComponent.0.GetLightState\" with no argument, returns bool.\n\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"}],"returns":{"type":"Anything","types":["Anything"],"description":"Depends on action","text":"Anything - Depends on action"},"form":"unary","operator":null,"left":null,"right":{"text":"[vehicle, pylon, actionPath(, arguments)]","types":["Array"]}}],"examples":[],"multiplayer":null,"problems":null,"aliases":[],"see_also":["Arma 3: Vehicle Loadouts"],"notes":[],"categories":["Arma 3: New Scripting Commands","Arma 3: Scripting Commands","Command Group: Vehicle Loadouts","Introduced with Arma 3 version 2.22","Scripting Commands","Scripting Commands: Local Effect"]}