{"name":"setMarkerAlpha","title":"setMarkerAlpha","type":"command","url":"https://community.bistudio.com/wiki/setMarkerAlpha","revid":370054,"updated":"2024-10-29T12:41:35Z","groups":["Markers"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","locality":{"effect":"global"},"description":"Sets the marker alpha. This is a modifier to the existing markerColor and will be applied on top of the marker color alpha. The marker is modified on all computers in a network session.\n\nWhen alpha equals `1`, the marker is visible, but if alpha equals `0`, then the marker is invisible.\n\nAlpha can be numbers and fractions.\n\n> [!NOTE]\n> **Multiplayer optimisation:** Global marker commands always broadcast the *entire* marker state over the network.\n> As such, the number of network messages exchanged when creating or editing a marker can be reduced by performing all but the last operation using local marker commands, then using a global marker command for the last change (and subsequent global broadcast of all changes applied to the marker).","syntaxes":[{"syntax":"marker setMarkerAlpha alpha","params":[{"name":"marker","type":"String","type_expr":"String"},{"name":"alpha","type":"Number","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"marker"},"right":{"text":"alpha"}}],"examples":[{"code":["\"my_marker\" setMarkerAlpha 0.5;"]},{"code":["\"enemy_convoy_marker\" setMarkerAlpha 0;"]}],"see_also":["setMarkerAlphaLocal","setMarkerBrush","setMarkerColor","setMarkerDir","setMarkerPos","setMarkerShape","setMarkerSize","setMarkerText","setMarkerType","createMarker"]}