Description
Hi i am using ChiaScript for game development and i have used lua in my previous projects.
while using ChiaScript i am facing an issue where functions of the same names are being redefined.
this is an issue when i have multiple game objects with a script component with an update function for example.
Currently everytime i attach a new script to the Chia script it overwrite the previous and local variables are lost.
I would need different game objects to run different scripts so ....
lua has a environment where scripts can be run so this issue does not happen.
does ChiaScript have something similar?
or do i have to have a ChiaScript for each game object which is what i probably will try next.
chaiscript::ChaiScript chai;
std::vector mgameObjects;
chai.use("Assets/Scripts/registervar.chai");
mgameObjects->?????