Guppy Posted August 20, 2014 Share Posted August 20, 2014 Adding a weapon prefab makes it a little clearer - I didn't think of that untill after I uploaded the video. Map file can be found here; https://drive.google.com/file/d/0B7B0hlkpWcYWUU5qdjBTa3QzWUU/edit?usp=sharing The map works just fine if I create a lua project - how ever using even a freshly created unmodified c++ project ( well I hit compile but that's all ) it's displaying this behaviour. Freshly created project; https://drive.google.com/file/d/0B7B0hlkpWcYWZ0R2Skg1QjVhQjA/edit?usp=sharing and yes I'm running Ubuntu 14.04 with that loathesome unity desktop System: Linux Mint 17 ( = Ubuntu 14.04 with cinnamon desktop ) Ubuntu 14.04, AMD HD 6850, i5 2500k Link to comment Share on other sites More sharing options...
Josh Posted August 20, 2014 Share Posted August 20, 2014 The default C++ code creates a camera in the App.cpp file. I think this is the camera that's being rendered while the invisible player walks around. My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
Guppy Posted August 20, 2014 Author Share Posted August 20, 2014 The default C++ code creates a camera in the App.cpp file. I think this is the camera that's being rendered while the invisible player walks around. Gah - you are correct, commenting out line 35-36 makes it work as expected. But then I lose my camera reference in c++ :| Oh well I set out to investigate how to pass information back and forth between C++ and lua, I suppose the camera is as good a place to start as any System: Linux Mint 17 ( = Ubuntu 14.04 with cinnamon desktop ) Ubuntu 14.04, AMD HD 6850, i5 2500k Link to comment Share on other sites More sharing options...
Josh Posted August 20, 2014 Share Posted August 20, 2014 The Interpreter class has some hidden goodies that go along with the Lua API nicely. Off the top of my head, I think this will set a Lua variable to an object: int stacksize = Interpreter::GetStackSize(); Interpreter::PushObject(entity); Interpreter::SetGlobal("MyEntity"); Interpreter::SetStackSize(stacksize); My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
Recommended Posts