Calling LUA Scripts in FSUIPC

How can be this controlled in that simulator? Can HIDmacros be used with this application?
Post Reply
Baobob
Posts: 15
Joined: 12 Oct 2011, 02:59

Calling LUA Scripts in FSUIPC

Post by Baobob » 17 Nov 2011, 04:53

Ok I have read... re-read... and read, again the section in scripts on the website about being able to use LUA scripts and macros that are loaded in FSUIPC by using the - HIDMacros.SetFSUIPCString offset, size, value - But I must admit I'm completely lost...

Can someone please show me how to impliment this?

If I want to activate this section of script...

Script file name is DukeEngineS.lua

Code: Select all

   if ipcPARAM == 59 then   --   Down One Position
        LVarSet = "L:Duke_Cowl_Flaps_Switch_2"
      val = 2
      if ipc.readLvar(LVarSet) == 0  then
         val = 1
      elseif ipc.readLvar(LVarSet) == 1  then
         val = 2
      end
      ipc.writeLvar(LVarSet, val)
   end
What would the HiD script look like?

Please forgive me for asking what must be simple things... after my head injury I just can't seem to learn easily. I know I should be able to figure it out but I can't seem to grasp it.

Thanks,
Bao
Fly Well,
Bao

"Getting it up there is all well and good. Lets just get it back down in one piece shall we?"

Post Reply