Skip to content

ChiaScript "enviroment"??? #587

Open
@nanoasp

Description

@nanoasp

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->?????

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions