Ok, in the Game Editor file, this works PERFECTLY >.> Ok I have this global code
- Code: Select all
void TypeMessage(char *message, double speed)
{
if (messagecomplete == 0)
{
strncpy(text, message, i);
framecount = framecount + 1;
if (framecount >= speed)
{
i++;
if (i<strlen(message))
{
PlaySound2("data/typing sound.wav", 0.422222, 1, 0.000000);
}
framecount = 0;
}
if (i>strlen(message))
{
messagecomplete = 1;
CreateActor("continuwsymble", "continue", "(none)", "(none)", textbox.xscreen, textbox.yscreen, false);
}
}
if (messageclear == 1)
{
strncmp(text, message, 0);
strncpy(text, message, 0);
i = 0;
messageclear = 0;
strcpy(message, " ");
}
}
Now, when I press Enter, it adds the next message blah blah, so it types the next message, also when I press enter I have it delete the old text actor and make a new one so that it wont you know, type over the original message, this works untill I compile it...
To put it short
I need a way to erase the old message and write the new one, but not in a manner of it typing over the original message, for example say I have this, "We are up high on this mountian", then the next message is "We are pretty high up, huh?", now how can I erase "We are up high on this mountian" before it types out "We are pretty high up, huh?"... I tried deleting it then creating a new one and it works in the game editor, but when you run the .exe it just shows the older message like it didnt even delete