Hi Guys, I haven't posted here in awhile. Hopefully someone can help me out with the Rich Edit object.
So I'm making an online chatroom as a part of my online game using Lacewing. I want to use the Rich Edit object to display the chat box. I was reading through the help file for the object, and it says for the "Set Text : inserts the given text at the current caret position or replaces the current selection by the given text.". Okay so in theory if I position the caret to the end of the text box, it should add the new message at the bottom, maybe in conjunction with a NewLine$ expression. I tried using the "Goto - sets the caret to the given character or line." action to move the caret to the end of the text by using the "Get total number of characters" expression. However it just rewrites the text box instead of adding it to the end. I also tried to use the "Unselect block" action to stop it from rewriting the text, but it still happens.
I don't want to do the workaround of adding the current text + the new text like you would do with a regular edit box. This is because I would also like to style the names of the people differently compared to the message they send.
For example, I would like to have the player's name bolded and colored blue. If I had the expression to do "current text + the new text", the formatting would be applied to all the text.
I also tried doing simple tests of just outputting a colored bolded name and a simple regular text message, but it didnt work either. Maybe I'm doing something wrong. I feel like this should be simple... Any help would be appreciated. I've included screenshots of my code and the output.
Code: Please login to see this link.
Output: Please login to see this link.