-
Notifications
You must be signed in to change notification settings - Fork 333
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ChiaScript "enviroment"??? #587
Comments
I don't understand your incomplete example; it doesn't seem related to the description of the problem you give earlier. What does "registervar.chai" contain? Do you mean that the C++ vector Can you provide a small example that shows what you're actually trying to do, on the C++ and ChaiScript sides? |
lets say i have 3 game objects.
i have made 3 different .chia scripts with the 3 different behaviours. The main question now is how do i link and run the 3 different scripts in runtime that applies their code to 3 different objects. gameobject{ std::string script = "name of chia script that will be loaded.chia"; //list of game objects gameloop{ //start simulation } //on every frame of simulation } the problem is in the linking i guess? |
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->?????
The text was updated successfully, but these errors were encountered: