Original Post
Hello, First of all, let me congratulate you for the clean interface that your lib have. It is much more easier to understand it than other script engines that I have experienced. It appears to be an excellent script engine. I am completely newbie with AngelScript, so I'm sorry if my doubt is something trivial. Lets put it in a practical way: we have a class Foo, and this class haves a Update() method and two attributes, and a kind of script holder.
class Foo
{
public:
Foo(){};
Update() {g_ASEngine->ExecuteString("whatever", mScript.c_str())};
float mVarA;
float mVarB;
string mScript;
};
Imagine that we have a lot of class instances and I want that classes running different scripts in the class scope. For instance:
Foo aInstance, anotherInstance;
aInstance.mScript = "mVarA = mVarA + mVarB";
anotherInstance.mScript = "mVarA = mVarA + mVarB";
When updating, obviously it wont work. I gave a look into Script Contexts and haven't fount anything that could change the scope of execution to the object 'this'. Any ideas? Thanks a lot.