Hi all,
A few weeks back I did a live Twitch stream that covered Lua and C++ in Stingray in considerable detail. This tutorial covers how to talk back and forth between Lua and a C++ DLL as well as Lua and Flow.
Solved! Go to Solution.
Solved by cornelh. Go to Solution.
Thanks for the video Matthew!
Just wanted to point out that if you are using Visual Studio on Windows 8 or 10 you can still compile LuaJIT without the Windows 7 SDK.
Open the start menu and type:
developer command prompt
This will launch a console. You then need to set the environment to 64bit so type:
cd VC
vcvarsall.bat x64
Then you're ready to proceed with building LuaJIT 🙂
Hi jerran.schmidt,
Great auxiliary info! Thanks for the tip.
Hello Matt I was going over your Intro to Lua for Stingray and I have a question.
I have a question about this:
local level = SimpleProject.level or nil
local level_name = SimpleProject.level_name or nil
local Trig_Event = stingray.Level.trigger_event
function Project.on_level_load_pre_flow()
local MyObject = AbeClass() --getting a reference to my class
MyObject:Foo("Hello Mate")
MyObject:Bar(3,15)
Trig_Event(level,"explode")
end
In the code above level returns nil and Trig_Event works fine even though the are both declared as local when I try and get references to SimpleProject and stingray.Level.trigger_event. The code above only works if I don't make the variable level local. Why is that?
Can't find what you're looking for? Ask the community or share your knowledge.