Page 1 of 1

Calling LUA Scripts in FSUIPC

Posted: 17 Nov 2011, 04:53
by Baobob
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