Jump to content

Lua Execution Order


nick.ace
 Share

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

  • Upvote 1
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

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.

 Share

×
×
  • Create New...