Jump to content
nick.ace

Lua Execution Order

Recommended Posts

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 :(

Share this post


Link to post

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.

Share this post


Link to post

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?

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...