Juhuuu, neues Spieli für die FSUIPC Freaks...
erstmal Update auf 4.544
Hier wurde eine neue Funktion eingeführt.
Pete Dowson erklärt das so:
9. Facilities have been added to automatically execute a list of Lua plugins or FSUIPC Macros when an aircraft is loaded. This allows switches, offsets, and other things to be set specifically for an aircraft when it is first loaded. It is done by adding new sections to the INI file with the title [Auto] or [Auto.xxxx...] where the xxxx part is the aircraft name, or part-name (as in Aircraft Specific sections), or a profile name when profiles are being used. The Auto sections thus parallel the Keys and Buttons sections -- the naming and selection follows the same system. The generic [Auto] section is carried out for all aircraft changes whilst the specific ones are only applied to matching aircraft.
Each Auto section can contain a series of numbered lines (1=..., 2=... etc) each of which is either a Lua command, or a Macro call. For example:
[Auto.737]
1=Lua SetMyOffsets
2=737 OHD:Air Allbleeds
When Lua calls run a plug-in which doesn't self-terminate, the plug-in thread still running is kiled automatically on an aircraft change.
kurz gesagt, kann mittels des Eintrages [Auto] oder [Auto.<Addonname>] eine automatische Ablaufsequenz beim laden des jeweiligen Addons gestartet werden.
Hierfür können Macros oder LUA files abgerufen werden.
Auf die Art und Weise habe ich es geschafft, z.B. die Pilot Yokes bei der Flight1 Mustang und der MD-11 und J41 automatisch abzusenken, da das eh immer einer meiner ersten Handlungen im Cockpit ist.
Diese kleinen Beispiele zeigen aber, was man damit alles tolles anstellen kann....
Hier mal die entsprechenden Codes am Beispiel der Yokes für die F1 Mustang:
in der FSUPIC4.ini
[Auto.F1 Cessna Mustang]
1=Lua F1_Mustanginit
das ensprechende Lua File namens
F1_Mustanginit.lua enthält
ipc.writeLvar("L:Yoke_Pilot", 1)
ipc.writeLvar("L:Yoke_CoPilot", 1)
das wars auch schon....