Big List of Defold Pro Tips!

Basics of scripting NPC text taking advantage of coroutines

This post is based on this article which inspired me to try this with Defold.

scripted_dialog_rpg_text_starter_coroutines.zip (49.8 KB)

Attached is a very rough example project. I’ll upload a nicer, cleaner project later, but this starter can still give people an idea. It uses arbitrary script loading and running like mentioned in previous post. For text, it uses Lua’s coroutines. This kind of setup would be very useful with all kinds of games where you interact with scripted objects!

7 Likes