trying to understand how this works…
I want to put functions in separate files and let a trigger event call them.
when I put the function “justDoIt” into same file as event listener it works ok:
SomeLocallyExistingDisplayObject:addEventListener(“touch”, justDoIt)
but it does not work if I do like this:
I put function “justDoIt” into file comeOn.lua.
In main.lua or file with event listener:
local comeOn = require (“comeOn”)
SomeLocallyExistingDisplayObject:addEventListener(“touch”, comeOn.justDoIt)
Would be happy if anyone could shed some light on this:)
[import]uid: 109677 topic_id: 21578 reply_id: 321578[/import]
