{"name":"setUserActionText","operator":null,"title":"setUserActionText","type":"command","url":"https://community.bistudio.com/wiki/setUserActionText","revid":369154,"updated":"2024-09-03T10:34:39Z","groups":["Interaction"],"status":"ok","replaced_by":[],"games":[{"game":"arma3","name":"Arma 3","version":"0.50"}],"since":{"game":"arma3","name":"Arma 3","version":"0.50"},"arma3_since":"0.50","branch":null,"locality":{"argument":"global","effect":"local","server_exec":false},"exec":null,"description":"Changes user added action (see addAction) menu item text.","syntaxes":[{"syntax":"object setUserActionText [actionIndex, textMenu, textWindowBackground, textWindowForeground]","since":null,"effect":null,"exec":null,"params":[{"name":"object","type":"Object","optional":false,"default":null,"description":"object the action is added to","types":["Object"],"since":null,"text":"object: Object - object the action is added to"},{"name":"actionIndex","type":"Number","optional":false,"default":null,"description":"action id returned by addAction","types":["Number"],"since":null,"text":"actionIndex: Number - action id returned by addAction"},{"name":"textMenu","type":"String or Structured Text","optional":false,"default":null,"description":"text title shown in scroll action menu","types":["String","Structured Text"],"since":null,"text":"textMenu: String or Structured Text - text title shown in scroll action menu"},{"name":"textWindowBackground","type":"String or Structured Text","optional":true,"default":"\"\"","description":"background text","types":["String","Structured Text"],"since":"arma3 1.62","text":"textWindowBackground: String or Structured Text - (Optional, default \"\") background text"},{"name":"textWindowForeground","type":"String or Structured Text","optional":true,"default":"\"\"","description":"foreground text","types":["String","Structured Text"],"since":"arma3 1.62","text":"textWindowForeground: String or Structured Text - (Optional, default \"\") foreground text"}],"returns":{"type":"Nothing","types":["Nothing"],"description":null,"text":"Nothing"},"form":"binary","operator":null,"left":{"text":"object","types":["Object"]},"right":{"text":"[actionIndex, textMenu, textWindowBackground, textWindowForeground]","types":["Array"]}}],"examples":[{"text":"```sqf\n_id = player addAction [\"Hello\", \"\"];\nplayer setUserActionText [_id, \"Good Bye\"];\n```","code":["_id = player addAction [\"Hello\", \"\"];\nplayer setUserActionText [_id, \"Good Bye\"];"]},{"text":"```sqf\n_id = billboard addAction [\"Some Action\", {}];\nbillboard setUserActionText [\n    _id, \n    \"Some Action\", \n    \"<t color='#ff0000'>Background-----------------</t><br>Multiline<br>Multiline<br>Multiline<br>. . .\", \n    \"<t color='#00ff00'>-----------------Foreground</t>\"\n];\n```","code":["_id = billboard addAction [\"Some Action\", {}];\nbillboard setUserActionText [\n\t_id, \n\t\"Some Action\", \n\t\"<t color='#ff0000'>Background-----------------</t><br>Multiline<br>Multiline<br>Multiline<br>. . .\", \n\t\"<t color='#00ff00'>-----------------Foreground</t>\"\n];"]}],"multiplayer":null,"problems":null,"aliases":[],"see_also":["actionIDs","actionParams","addAction","inGameUISetEventHandler","showHUD","inputAction","removeAction","removeAllActions","action"],"notes":[],"categories":["Arma 3: New Scripting Commands","Arma 3: Scripting Commands","Command Group: Interaction","Introduced with Arma 3 version 0.50","Scripting Commands","Scripting Commands: Local Effect"]}