Page 1 of 1

Pass a variable

PostPosted: Wed Apr 04, 2007 4:16 am
by Fuzzy
What is a good way to pass a variable to an actor made with create actor in a script?

PostPosted: Wed Apr 04, 2007 8:18 am
by jazz_e_bob
When you create a child, remember it's name.

Code: Select all
Actor *myChild = CreateActor("child", "icon", "(none)", "(none)", 200, 0, false);

strcpy ( myChildsCloneName, myChild->clonename );


Then you can call it by name to change it's parameters.

Code: Select all
getclone( myChildsCloneName )->xvelocity = 10;

PostPosted: Wed Apr 04, 2007 11:08 am
by Fuzzy
Many thanks.