Dekade 2 Posted April 3, 2022 I've been trying to add color to a custom action in the scroll menu but I can't seem to figure it out. This is what I have; _SM = SM_Officer addAction ["Recruit Squad", { [] spawn DEK_fnc_spawnPlayerSquad; }]; SM_Officer setUserActionText [_SM, "Recruit Squad", "", "<t color='#ff0000'>Recruit Squad</t>"]; The action text that is displayed on the center of the screen is colored the way I want but the item in the scroll menu still just shows as the default white color. I tried adding the color tag to the addAction String but that doesn't seem to do the trick. I've looked everywhere but can't seem to figure it out, it's probably trivial but if someone can point me in the right direction that would be great. Thanks in advance! Regards, Dekade Share this post Link to post Share on other sites
Harzach 2518 Posted April 3, 2022 _SM = SM_Officer addAction ["<t color='#FF0000'>Recruit Squad</t>", { [] spawn DEK_fnc_spawnPlayerSquad; }]; Share this post Link to post Share on other sites
Dekade 2 Posted April 3, 2022 6 minutes ago, Harzach said: _SM = SM_Officer addAction ["<t color='#FF0000'>Recruit Squad</t>", { [] spawn DEK_fnc_spawnPlayerSquad; }]; For some strange reason that is not working for me. Even when copy/pasting I don't get the same result. Any clue why? My code: _SM = SM_Officer addAction ["<t color='#ff0000'>Recruit Squad</t>", { [] spawn DEK_fnc_spawnPlayerSquad; }]; SM_Officer setUserActionText [_SM, "Recruit Squad", "", "<t color='#ff0000'>Recruit Squad</t>"]; Thanks Share this post Link to post Share on other sites
Harzach 2518 Posted April 3, 2022 Mine: 13 minutes ago, Harzach said: _SM = SM_Officer addAction ["<t color='#FF0000'>Recruit Squad</t>", { [] spawn DEK_fnc_spawnPlayerSquad; }]; Yours: 6 minutes ago, Dekade said: _SM = SM_Officer addAction ["<t color='#ff0000'>Recruit Squad</t>", { [] spawn DEK_fnc_spawnPlayerSquad; }]; SM_Officer setUserActionText [_SM, "Recruit Squad", "", "<t color='#ff0000'>Recruit Squad</t>"]; Not only is setUserActionText redundant here, it is actually undoing what we started with. 1 Share this post Link to post Share on other sites
Dekade 2 Posted April 3, 2022 2 minutes ago, Harzach said: Mine: Yours: Not only is setUserActionText redundant here, it is actually undoing what we started with. Damn that was simple. #FeelsStupid Thanks man! 1 Share this post Link to post Share on other sites
Harzach 2518 Posted April 3, 2022 setUserActionText is great for when you want to have different text in the text menu and text window. For example, here's a snippet I grabbed from someone a few years ago: _GPS = this addAction ["Take GPS","player addItem 'ItemGPS';",nil,6,true,false,"","true",-1,false,"",""]; _map = this addAction ["Take Map","player addItem 'ItemMap';",nil,6,true,false,"","true",-1,false,"",""]; _radio = this addAction ["Take Radio","player addItem 'ItemRadio';",nil,6,true,false,"","true",-1,false,"",""]; _compass = this addAction ["Take Compass","player addItem 'ItemCompass';",nil,6,true,false,"","true",-1,false,"",""]; this setUserActionText [_gps,"Take GPS","Use Scroll Wheel<br/>to select item",""]; this setUserActionText [_map,"Take Map","Use Scroll Wheel<br/>to select item",""]; this setUserActionText [_compass,"Take Compass","Use Scroll Wheel<br/>to select item",""]; this setUserActionText [_radio,"Take Radio","Use Scroll Wheel<br/>to select item",""]; Place it in any object and you'll see that the window text never changes, so as to direct your attention to the choices you have in the menu: 3 Share this post Link to post Share on other sites
dreadedentity 278 Posted April 3, 2022 setUserActionText can of course change the color too, you just need to add the color in the right place SM_Officer setUserActionText [_SM, "<t color='#ff0000'>Recruit Squad</t>", "", "<t color='#ff0000'>Recruit Squad</t>"]; 2 Share this post Link to post Share on other sites
Dekade 2 Posted April 3, 2022 Thanks for the information guys! Very helpful. Share this post Link to post Share on other sites
major-stiffy 281 Posted April 4, 2022 What about MP? Would remoteExec be required? If so, how? Share this post Link to post Share on other sites
dreadedentity 278 Posted April 4, 2022 Both setUserActionText and addAction have local effects, which you can find above the Description on their wiki pages, so they will need remoteExec if you are trying to affect them from the server 1 Share this post Link to post Share on other sites