Page 1 of 1

Lots of text

PostPosted: Sat May 30, 2009 9:57 pm
by MonteyPython
Im my game, there is a lot of talking with text, and i was wondering if there was a way to make the same actor change text instead of having a bunch of actors saying every different thing.
Anyone's help would be appreciated :mrgreen:

Re: Lots of text

PostPosted: Sun May 31, 2009 12:12 am
by skydereign
Yes, you can change the text with strcpy. The actor name for actor, and you can either use a char* which is a string, or you can insert directly what you want, needs to be within double quotes if you do.
Code: Select all
strcpy(actor.text, "text goes here or a char*");

Re: Lots of text

PostPosted: Sun May 31, 2009 12:48 am
by MonteyPython
two questions. 1. Where does this script go and 2. Can i pick which font to use?

Re: Lots of text

PostPosted: Sun May 31, 2009 12:52 am
by skydereign
No, I think the only font you can have is the font of the text actor. I could be wrong, but I don't think so... That script would go in the event that changes the text, if a keydown would do so, you might have a conditional, and inside would be the strcpy, because what it is doing is copying whatever is in the latter part to the text of your actor.

Re: Lots of text

PostPosted: Sun May 31, 2009 6:05 am
by MonteyPython
well, i'm putting the code into the keydown event, but it doesn't let me add the event.

Re: Lots of text

PostPosted: Sun May 31, 2009 8:13 am
by skydereign
Works fine for me. Here is a .ged of it working.

Re: Lots of text

PostPosted: Mon Jun 01, 2009 4:57 am
by MonteyPython
Ok cool. it works now. Thanks :mrgreen: