Guppy Posted September 27, 2014 Posted September 27, 2014 My code boils down to this; in C++ Leadwerks::World* world = Leadwerks::World::GetCurrent(); Leadwerks::Entity* e=world->FindEntity(EntityName); if ( output ) { e->CallOutputs(EntityFunction); }else{ e->CallFunction(EntityFunction); } in the first lua script function Script:TestOutput(event)--out print("[Lua] TestOutput"); if ( type(event)=="table" ) then print ( "TestOutput has event data") end self.component:CallOutputs("TestOutputxx") end in the 2nd lua script function Script:TestInput(event) --in print("[Lua] TestInput"); if ( type(event)=="table" ) then print ( "TestInput has event data") end end Calling the function TestOutput works - it ends up calling TestInput, but when I try to skip the middle man and call "TestOutputxx" notting happens. Is that a bug or am I missing something? ps. code tags are murdering my indentation - sorry about that Quote System: Linux Mint 17 ( = Ubuntu 14.04 with cinnamon desktop ) Ubuntu 14.04, AMD HD 6850, i5 2500k
Josh Posted September 27, 2014 Posted September 27, 2014 This is not official API stuff, but the actual way it works is Entity->component->CallOutputs(const std::string& outputname) 1 Quote My job is to make tools you love, with the features you want, and performance you can't live without.
AggrorJorn Posted September 27, 2014 Posted September 27, 2014 oftopic: yeah those code reformats are annoying. It happens all over the forum. If you toggle the editing mode and then paste your code, it will note lose indention 3 Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.