Jump to content

Lua Coroutines Tutorial


Josh
 Share

Recommended Posts

This is the format for tutorials.

Tutorials_Editor_Lights.xml

I created the following special tags you can use in the XML:

[h2]
[h3]
[h4]
[/h2]
[/h3]
[/h4]
[script]
[/script]

Note that the <> brackets must be typed out as &#60; and &#62; or it will mess up the XML format.

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

Oh, this is cool. I've toyed in my mind the idea of creating interface where text prints to screen like in Nostromo from Alien movies. This is way above my current level with lua though, but it looks like Ricks example above can be used to do exactly that!

  • Upvote 1
Link to comment
Share on other sites

That comment was about waiting inside a script for a period of time. Pausing the entire game is different functionality. If you need to pause the game, not call any script functions, then you'd probably do that with not calling the world update inside main.lua which should make it so nonen of the scripts in your scene call thier update functions which should essentially pause the entire game.

Coroutines are more for sequence of events being coded sequentially vs managing the state and branching off based of the state.

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