This is a simple page meant to be used for documentation-driven design in my Dendrite game engine. This is where I write some simple documentation and use it as a reference for implementing the code.
To link a script, select an entity in the game editor and click the 'link' dropdown button. Then click the menu item 'lua script'.
If you need to link a script to your scene, simply go to Game > World Settings or use command-shift-W (Mac) cntrl-shift-W (Windows/Linux) to attach a script to the current world.
Here is a simple Lua file explaining how a script is created:
-- This is our script's start function, it is called when the script is loaded.
function script:start()
Console.log("Script loaded!")
end
-- This is our update function, this is a function called once per frame in the game.
function script:update()
if input.key_pressed("x") then
World.get("Player").rotation += 0.1
end
end