# Big List of Defold Pro Tips!

**URL:** <https://forum.defold.com/t/big-list-of-defold-pro-tips/1519>\
**Category:** The Defoldmine\
**Created:** [April 12, 2016, 2:55am UTC](https://forum.defold.com/t/big-list-of-defold-pro-tips/1519 "2016-04-12T02:55:35Z")\
**Posts on this page:** 1\
**Showing post:** 10

<div class="post-metadata">

**Author:** ![Pkeod](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/pkeod/32/606_2.png) [@Pkeod](https://forum.defold.com/u/Pkeod)\
**Post date:** [April 14, 2016, 4:36am UTC](https://forum.defold.com/t/big-list-of-defold-pro-tips/1519/10 "2016-04-14T04:36:58Z")

</div>

**Basics of scripting NPC text taking advantage of coroutines**

This post is based on [this article](http://lua.space/gamedev/using-lua-coroutines-to-create-rpg) which inspired me to try this with Defold.

![](https://forum-defold.b-cdn.net/uploads/default/original/1X/fb0ee26c33562fbd03fb8de9721f25c96cb34d00.gif)

[scripted\_dialog\_rpg\_text\_starter\_coroutines.zip](https://forum.defold.com/uploads/default/original/1X/a9aba83c5f255a1547cd80a1e8c3f83090b978dc.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!

---

_[View the full topic](https://forum.defold.com/t/big-list-of-defold-pro-tips/1519)._
