Goldace31415
01-03-2017, 02:58 PM
So if you don't know already, Morning's name ingame has a check mark on the left of it, presumably his tag. Whenever he types a new message in chat tho this check changes color and I've been interested in it for quit some time now. I know he is fairly secretive about it so I won't be releasing any code publicly without his permission but if someone could help me out with a few questions I have that would be awesome! I have devised a couple of ways to achieve this effect ingame:
1. Completely random colors
This would involve randomly generating either a letter (A-F) or a number (0-9) and formatting it into a hex to create a truly random color (ex: #FA5C00)
Then you would have to execute sm_customtag "{}HEXCOLORpreferredtag" either every time you type a message or every ____ period of time
2. Random KSF colors
Since KSF has default colors; {1}, {2}, etc. You could randomly generate a number between 1 and the number of presets on ksf
Then sm_customtag "{RNGNUMBER}preferredtag" again either every time you type a message or every ____ period of time
3. Set 2 colors
For example if you only wanted to switch between blue and green, you could have an integer counter or boolean that switches between 1 and 0, or true and false respectively. You could then use an if statement to determine whether to sm_customtag "{}COLOR1preferredtag" or to sm_customtag "{}COLOR2preferredtag" executed after each message.
4. Set colors >2
If you wanted more than two specific colors this can be achieved in the same way as method 3 but an integer counter must be used. For each message you send the counter would have to be increased by one and a different if statement would signify a different colors in the sm_customtag command, executed after each message
5. Random color from list
If you had a list of colors that you liked but didn't care in which order they appeared in, you could have a random number generated from 0 - #of colors and have a separate if statement for each color, executed either after each message or randomly every ___ period of time
As I do have the programming capabilities to achieve this, I have little to no experience with coding in CSS or valve language in general, for all I know there may not be a language that is executable beyond in-game commands. I have looked at a list of over 2000 commands and nowhere in there is a simple random number generator (RNG) or something that can act as a boolean, counter, if statement, or detector for when a message is sent ingame. If anyone knows of a way to program this into the source code of CSS it would be much appreciated! Thanks for taking the time to read :)
EDIT: This could also be done by a third party macro, which I myself do not know how to execute within CSS though
TL;DR: If you know of a way to program the source code of CSS it would be greatly appreciated if you would mind sharing :)
1. Completely random colors
This would involve randomly generating either a letter (A-F) or a number (0-9) and formatting it into a hex to create a truly random color (ex: #FA5C00)
Then you would have to execute sm_customtag "{}HEXCOLORpreferredtag" either every time you type a message or every ____ period of time
2. Random KSF colors
Since KSF has default colors; {1}, {2}, etc. You could randomly generate a number between 1 and the number of presets on ksf
Then sm_customtag "{RNGNUMBER}preferredtag" again either every time you type a message or every ____ period of time
3. Set 2 colors
For example if you only wanted to switch between blue and green, you could have an integer counter or boolean that switches between 1 and 0, or true and false respectively. You could then use an if statement to determine whether to sm_customtag "{}COLOR1preferredtag" or to sm_customtag "{}COLOR2preferredtag" executed after each message.
4. Set colors >2
If you wanted more than two specific colors this can be achieved in the same way as method 3 but an integer counter must be used. For each message you send the counter would have to be increased by one and a different if statement would signify a different colors in the sm_customtag command, executed after each message
5. Random color from list
If you had a list of colors that you liked but didn't care in which order they appeared in, you could have a random number generated from 0 - #of colors and have a separate if statement for each color, executed either after each message or randomly every ___ period of time
As I do have the programming capabilities to achieve this, I have little to no experience with coding in CSS or valve language in general, for all I know there may not be a language that is executable beyond in-game commands. I have looked at a list of over 2000 commands and nowhere in there is a simple random number generator (RNG) or something that can act as a boolean, counter, if statement, or detector for when a message is sent ingame. If anyone knows of a way to program this into the source code of CSS it would be much appreciated! Thanks for taking the time to read :)
EDIT: This could also be done by a third party macro, which I myself do not know how to execute within CSS though
TL;DR: If you know of a way to program the source code of CSS it would be greatly appreciated if you would mind sharing :)