-
Notifications
You must be signed in to change notification settings - Fork 373
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
Eluna Running and reloading on Multiple maps causing issues #485
Comments
That's as expected. Each map has its own Lua state, and each state runs every script that is considered global. If you want a script to only run on a specific map, put it in a subdirectory prefixed with the map id. If you only want it to run in the global state, add the following to the top of the script.
If you want it to run on all states except the global state, then reverse the logic and do ==. |
That wasn't the case before, why this change all of sudden ? |
I imagine you didn't intend to close the issue, so I'll reopen it. From July 1st we've officially switched from the old, single state implementation to multistate by default. What multistate is, is explained in length on our discord server. I'm not sure if you're a member there or not, but it's in the announcement channel. I'm short, multistate has unique Lua states per map for pretty large performance reasons. The old single state scheme forced emulators to run single threaded, which is pretty bad. Some scripts therefore need to be adjusted to work as intended with multistate. |
When i use reload Eluna it actually reloads on all maps i understand that but -1 should be all maps,
Now my problem is i wrote normal script and it's running multiple times :
Simple Script :
The text was updated successfully, but these errors were encountered: