Game Development Community

Chathud limit of 255

by Randy Thomas · in Technical Issues · 09/16/2008 (10:40 pm) · 3 replies

Does anyone know how to expand the limit of the Chathud beyond 255 characters? I found in the guiTextCtrl.h file "S32 mMaxStrLen; // max string len, must be less then or equal to 255" Does this mean I'm stuck with 255 characters? I found how to make triggers send a message to the mainchathud but need more information to be displayed. I'm creating an environment for my students. for example: if a student walks out onto the dock I want a HUD to come up explaining how goods were transported in the 17th century. If I can't expand on the chathud, does anyone have an idea of what I could use? I thought about using something like what "Adventure Africa" did with the flash screens, but that's way beyond my skills.

#1
09/17/2008 (6:30 am)
You will need to break up the strings that are longer than 255 characters.
#2
09/17/2008 (7:01 am)
I think is better to use split for the string into pieces of 255. In any chat send this pieces with a loop.
ie

word[0] = "hello"; // max lenght = 255
word[1] = "i am from Greece";
word[3] = "need to make this";

for( %i = 0; word[%i] !$= ""; %i++ )
echo (" " @ word[%i]);
#3
09/18/2008 (11:11 am)
AWESOME IDEA!!! I would have never thought of that! Thanks!