Page 1 of 1

char text[MAX_SCRIPTTEXT];

PostPosted: Wed May 05, 2004 4:07 pm
by Just4Fun
How does one interpret all/any of the listed C script functions in GE?

For example:
char text[MAX_SCRIPTTEXT];
or this:
char name[ACTOR_NAME];

or better yet:
How do we come up with proper interpretations of this stuff for GE?


From this: char *strcpy(char * dst, const char * src)
To this: strcpy(MyActor.text,"Hello World.");

There must be some kind of pattern or system to using/translating these functions in GE, but I can't see it. :(

My numerous C language books don't seem to make things any clearer when applying this stuff to GE.

At this point, I am trying to go through the script docs and get some working knowledge of how each function works and how to call each function in GE. As usual... TIA

PostPosted: Thu May 06, 2004 1:38 pm
by makslane
text[MAX_SCRIPTTEXT] is a C string with a maximum of
MAX_SCRIPTTEXT characters (256 characters)

name[ACTOR_NAME] is a C string with a maximum of ACTOR_NAME characters (32 characters)


If your actor MyActor has a text set in Actor Control, you can use

strcpy(MyActor.text,"Hello World.");

To change the text to "Hello World."

PostPosted: Thu May 06, 2004 3:22 pm
by Just4Fun
Thank you, Makslane,

I *think* I understand what the actual C script is doing from my C language books....but,

how is the C script for GE interpreted into GE syntax?

I understand how to use strcpy syntax now, thanks to Jazz-e-Bob's posting....but

How do I interpret the other C language script into GE syntax?

For example:

is name[Actor] called in GE using ("MyActor") in GE syntax?

is text[MAX_SCRIPTTEXT] called using MyActor.text(20)? in GE syntax


I'm looking for help for the conversion from the C script listed in the GE docs to GE script syntax...


For Example,
What is the syntax for these"[]" in GE script? Do they = "()" in GE?

What is the syntax for "text[]" in GE script? Is text= ".text()" or ".text[]" in GE?

Maybe I'm missing the point err here? and...probably giving everyone else a headache... :?

PostPosted: Fri May 07, 2004 12:26 pm
by makslane
> how is the C script for GE interpreted into GE syntax?
There is no GE sintax, but a C syntax into GE

> MyActor.text(20)?
This make no sense :-(


forget [] in the text vars. Simply, use:

text to access "Event Actor" text
YourActor.text to access the text of YourActor actor