Today I will show you something from the game-play scripting for Backworlds. In other words, what we do (partly) to make stuff happen in the game. We use a scripting language called Lua which we write in external text files that are loaded into the game. The advantage of this is that we can write functionality without having to recompile the game, reloading the level is enough.
I will begin by saying that Anders has moved a lot of the things we used to do with this into the engine and tied it to objects in the editor, making life a little easier for us when creating levels. But it is great for testing new ideas and we still have to use Lua in a lot of special cases and custom events. But enough explaining, let me demonstrate in this two part video!
Note: I make a mistake in the video by sampling the statue position every frame rather than only once in the OnCreate function, causing the object to move down very fast.
Herp derp ork bork!