beo6 Posted June 16, 2013 Share Posted June 16, 2013 Hello, i wonder how we should be able to create an argument function in lua like it is showed here: http://www.leadwerks.com/werkspace/page/documentation/_/user-guide/object-scripts-r631 a function like this does not work: function Script:GetValue()--out return self.thevalue end and adding a second parameter to self.component:CallOutputs("GetValue", self.thevalue) doesn't work also and is most probably wrong anyway. haven't found any better documentation about that. Quote Link to comment Share on other sites More sharing options...
AggrorJorn Posted June 16, 2013 Share Posted June 16, 2013 I have asked Josh a question about this but I haven't gotten a response yet. I have been holding of the flowgraph tutorial for about 4 weeks now since I don't know how it works. Quote Link to comment Share on other sites More sharing options...
NarkLord Posted June 17, 2013 Share Posted June 17, 2013 This will work function Script:GetValue()--arg return self.thevalue end 1 Quote Link to comment Share on other sites More sharing options...
beo6 Posted June 17, 2013 Author Share Posted June 17, 2013 wow thanks. After everything i have tried i didn't came to try it this way. Will try it out when i am home. Am i blind or where is that documented? Quote Link to comment Share on other sites More sharing options...
NarkLord Posted June 17, 2013 Share Posted June 17, 2013 I don't think it's documented. I just guessed. I'm finding most things about the engine quite intuitive. Although initially I thought --out should have worked Quote Link to comment Share on other sites More sharing options...
beo6 Posted June 17, 2013 Author Share Posted June 17, 2013 i find it intuitive too. Thats the reason why i tried --out but i haven't thought about trying --arg. Quote Link to comment Share on other sites More sharing options...
Rick Posted June 17, 2013 Share Posted June 17, 2013 Nice, I wasn't sure about this either. beo6, I was able to make a level picker script that sets a value based on what button was picked and then triggers your script. It's working great so far! Quote Link to comment Share on other sites More sharing options...
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.