direct access to actor from a variable

is there a way to get direct access to an actors variables when the name of the actor is a clone and is stored as a string?
example:
on the clone actor i create a actor variable string called myCloneName when it collides with a an actor named "whatever"
on the global code i create a function to try to get the variable to act as an actor name
obviously the syntax is wrong so im wondering what is the right way to do this?
example:
on the clone actor i create a actor variable string called myCloneName when it collides with a an actor named "whatever"
- Code: Select all
sprintf(collide.myCloneName, "%s" clonename);
on the global code i create a function to try to get the variable to act as an actor name
- Code: Select all
void myFunction()
{
myCloneName.yvelocity-=5;
obviously the syntax is wrong so im wondering what is the right way to do this?