Created
August 24, 2014 15:29
-
-
Save pajlada/8870f4b58154976513d2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- First luascript (id 5) | |
function my_custom_function() | |
local id1 = 5 | |
local id2 = 10 | |
local id3 = 20 | |
return id1, id2, id3 | |
end | |
-- Second luascript | |
function init() | |
my_lua = world:get_entity(5) | |
end | |
function step() | |
local id1, id2, id3 = my_lua:call("my_custom_function") | |
-- do what you wish with the id1, id2, id3 | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment