nick.ace Posted August 24, 2014 Share Posted August 24, 2014 Quick question, what is the execution order of Lua scripts? For example, if I have a scene with 3 entities with Lua scripts, is the Lua script of the entity that is listed first always called first? I apologize if this is a repeated question since this sounds pretty basic, I tried searching but I couldn't find anything 1 Quote Link to comment Share on other sites More sharing options...
NewPalette Posted August 26, 2014 Share Posted August 26, 2014 Hi, I'm new to Leadwerks, and not currently at my workstation, but you could probably discover what order the scripts get run in my putting a debug or console statement into each of them, or my running them in debug mode with breakpoints in each script and seeing what order you hit the breakpoints in. It's possible you'll find the order is nondeterministic, but if I had to guess I'd expect the order to be the same as in the entity list. Quote Link to comment Share on other sites More sharing options...
Josh Posted August 26, 2014 Share Posted August 26, 2014 There is no reliable or defined order of execution. Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
nick.ace Posted August 26, 2014 Author Share Posted August 26, 2014 Well on the backend, how are the scripts run? Surely there is a list of scripts that are iterated through right? Or are they handled on different threads? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.