gypsyczar

Calling actions.lua functions

Recommended Posts

Sorry for this stupid newbie question, but it is hard to figure things out without documentation.

There is a nice aircraft specific actions.lua file with hundreds of wonderful functions available for my aircraft.  I would like to create my own lua module that uses logic that calls some of these existing functions in the actions.lua file.  My lua file would then be called by FSUIPC as a button press to do amazing things :-).

Is there a way to call functions that exist in the actions.lua file or do I have to copy the actual function code from Actions.lua to my lua code for this to work?  I guess, in other words, is there an "include" directive or something similar that I could put in my code to avoid having to copy the actual code from actions.lua?

Share this post


Link to post
Share on other sites
Help AVSIM continue to serve you!
Please donate today!

As far as I know it is not possible to call LINDA functions from FSUIPC. The best advice I can give is to place your functions in user.lua within the aircrafts folder. These functions can then call any LINDA actions.lua or library functions and be assigned within LINDA to any buttons. Such functions would then be called immediately a button pressed is detected by FSUIPC. 

Share this post


Link to post
Share on other sites

Sorry I wasn't very clear.

I want to assign a button in FSUIPC to execute a Mycode.lua that I will write.  Within Mycode.lua I would like to call functions in actions.lua.  I do not want to call the actions.lua functions directly from FSUIPC  I understand that I could use the LINDA GUI to do the button assignments but I'd rather do it all through code if it is possible.  If not I can use the GUI

Thanks for helping a stubborn newbie

Share this post


Link to post
Share on other sites

Even a lua module running in FSUIPC cannot call anything out with its thread (ie. it cannot call anything in LINDA). Sorry. 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now