SchneiH2 Posted December 13, 2015 Report Posted December 13, 2015 Hi everybodyI came accross a problem for the engine start-up procedure which I would like to configure similar to Airbus family, i.e. for the ignition/igniter is obviously used one switch on the pedestal which activates ignition simultaneously for both engines (all other start-up procedure steps have dedicated switches/buttons per engine). Having looked through the available datarefs + command I could not fine one for this type of 'combined' ignition. On the other hand, to my understanding manipulators allow only one dataref to be linked to (or is their any way to combine multiple ones?) so with such switch I only can activate the ignition for one engine only. Thank you up-front for possible replies/help.Best regardsSHJ Quote
JGregory Posted December 13, 2015 Report Posted December 13, 2015 On the other hand, to my understanding manipulators allow only one dataref to be linked to (or is their any way to combine multiple ones?)That is correct. Having looked through the available datarefs + command I could not fine one for this type of 'combined' ignition.I don't believe there is any way to do this without a plugin as there are currently no DataRefs or Commands for ALL igniters. Quote
SchneiH2 Posted December 13, 2015 Author Report Posted December 13, 2015 Hi JimThanks for the quick response. I will try to find a workaround without a plugin.Best regardsSHJ Quote
ilias.tselios Posted December 14, 2015 Report Posted December 14, 2015 I will try to find a workaround without a plugin. I do not want to disappoint you, but X-Plane's default "systems" have a certain logic attached to them. If your needs dictate a different logic, then the use of a plugin is the only way to go. I've been there and I know. And by using a plugin, open a whole new world of possibilities. Quote
SchneiH2 Posted December 14, 2015 Author Report Posted December 14, 2015 Hi airfighterThank you for your response. One reason why I was asking was to be sure that no dataraf/command will have this functionality. Due to the huge number of datarefs/commands and their sometimes quite brief description I just wanted to be sure not to have missed such one. Regarding plugins I have to admit that so far I did not have the time and courage to start with this surely interesting matter. Is there any good beginners tutorial available to get started with this subject? Another reason why being hesitant with plugins is that I have noticed that in some cases they can cause problems with the simulator itself if not thoroughly programmed.Whatsowever, I feel that sooner or later I will have to start dealing with plugin programming.Thank you again and best regardsSHJ Quote
ilias.tselios Posted December 14, 2015 Report Posted December 14, 2015 SHJ, First of all I have no formal education in programming. I have though the curiosity and the patience to learn, try to understand sometimes things that are mind bending (when you don't have the formal education), and the persistence to try and fail until succeed. In brief, back in 2012, after learning a bit my way around in blender, I start developing an update for the XP9 Avanti to Avanti II. Very soon came to a problem. The landing light switch in Avanti II has 3 positions. OFF-TAXI-LDG. Now, I'm in a fully 3D cockpit... how I'm gonna do that? I asked as you did and got the same answers. Plugin! I said noway! But a guy offered to do that for me. He wrote a short script in SASL with a ton of comments. That was everything! I started to read and understand how this worked...ending up to release the aircraft with a total 14 scripts, 36 custom datarefs, with a fully simulated autopilot, custom draws on the PFD/MFD etc! Ok... i had to ask again few times, but about 95% was my own staff. I'm not saying all these to make me look...an amazing person, but to underline that is not the hardest thing in the world! Now, my suggestion is to start looking at lua, the programming language for Gizmo and SASL... or forgot SASL... look at Gizmo only since is the only one that is fully supported and most developer-friendly of the two. Oh, did I mentioned and more powerful too? It is! If you have one of X-Aviation products installed, then you are ready to start! Go here http://forums.x-pilot.com/forum/117-gizmo-development/ to read about tutorials, other members questions etc. To start playing with this go to and aircraft (like the KC-10 which is free from other plugins), and create (in the KC-10 folder) a folder named "scripts". Open a text editor (if you are using windows notepad++ is free and more that enough to start with), create a new empty file and save it inside the scripts folder as "init.lua". Go back to the text editor and paste this code:--Everything after the double dashes is a comment and will not affect the script.--Like keeping notes to know what everything does.--Programmers: I keep it as simple as possible to make it very ease to understand...Don't shout on me...but correct me if I'm wrong.airspeed = dref.getDataref("sim/flightmodel/position/indicated_airspeed") --We read the indicated airspeed from X-Plane and store it into "airspeed"lg_handle = dref.getDataref("sim/cockpit2/controls/gear_handle_down") -- Same here. We read the gear handle position from X-Plane and store it into "lg_handle" function main() -- From this point to the "end" of the bottom we do all our stuff! local as = dref.getFloat(airspeed) -- We store locally the value of "airspeed" to "as" to use it below if as > 160 then -- We are checking if the airspeed is above 160 kts, then... dref.setInt(lg_handle, 0) -- set the landing gear handle to 0, which means up, hense...gears up else -- in every case that airspeed is not bigger than 160 kts... means of course equal or less than 160 kts dref.setInt(lg_handle, 1) -- gear handle down -> gears down end -- end of that "if" paragraph! end --end of the functionNow save the file. Fire up X-Plane, load KC-10 and take off. Watch what will happened when the airspeed reaches 160 kts...Gears up! Slow below 160 kts. Gear down! Now the aircraft has an automatic system to deploy and retract the landings gears! Time for you to play now... Of course this is probably the simplest example, but enough for you to start crawling! Best Regards Quote
SchneiH2 Posted December 15, 2015 Author Report Posted December 15, 2015 Hi airfighter Thank you very much for your very comprehensive response. I am really grateful! Seems that I am going to face the same fate, i.e. sooner or later I will start dealing with plugin programming. The example code looks comprehensible to me the more that I am not a complete newbie in programming (mainly VBA, a bit Delphi some years ago). I also had a look to your recommendation 'lua'. For the moment I am still a bit puzzled since I have to admit that so far I rather took a user perspective, i.e. dealing with 'complex' installation procedures (all what exceeds an xyz.exe-installer which puts all necessary program files in the right pace) was always scaring me a bit. Perhaps I might have here for the moment a complete wrong understanding. If I got you correctly (I couldnt try it out so far) it is enough to put the above script in the right place in XPlane and it works. So no other installation, dlls etc. are being required? Another question that immediately came up is where to find the syntax description/object model for the language (e.g. dref.getDataref("sim/flightmodel/position/indicated_airspeed" etc.).Please don't feel too much bothered with my above response. I understand that I cannot expect under this topic a beginners tutorial on this subject and I fully agree that the bulk of the problems/questions must be solved by myself just having enough persistence.Again, many thanks and best regardsSHJ Quote
ilias.tselios Posted December 15, 2015 Report Posted December 15, 2015 As I mentioned in my previous post, if you have the Gizmo plugin installed in your X-Plane installation...you are good to go. No need for anything else. For example if you have skymaxx you do have it. To clear things up a bit, what Gizmo does is translates your scripts written in lua to that kind of code that X-Plane understands, without the need you to code in c/c++ and compile. So, you ending up coding in much easier to understand programming language, save the file, press the reboot on Gizmo in X-Plane that run simultaneously, and your code is running, with all debugging informations in front of you! Ultra fast procedure which makes coding really fun! Specially for guys like me, who here and there forgot to put an "end" in a function! Gizmo syntax can be found here: http://gizmo64.com/Gizmo64_API.htm Quote
SchneiH2 Posted December 15, 2015 Author Report Posted December 15, 2015 Wow, this I call a fast response! Thank you very much. The sky gets a bit clearer now.Best regardsSHJ Quote
SchneiH2 Posted December 19, 2015 Author Report Posted December 19, 2015 Hi airfighter Perhaps you (or any other kind forum member) can give me now a hint on how to get the Gizmo-plugin running. I have installed (extracted + copied) it in the XP10 plugin folder (see attached pic) but it does not appear in the plugin-box of XP10 to enable it (I guess I have to do it, see attached pic). By the way I use the 32-bit version of XP10. I mentioning this because of the 64 in the Gizmo folder!? Thank you up-front for a possible reply/help.Best regards SHJ Quote
Cameron Posted December 19, 2015 Report Posted December 19, 2015 Gizmo does not work in anything but 64 bit. Quote
SchneiH2 Posted December 19, 2015 Author Report Posted December 19, 2015 Hi CameronI have running 32-bit (see attached pic)Best regardsSHJ Quote
Cameron Posted December 19, 2015 Report Posted December 19, 2015 Right, so you can't run Gizmo. Quote
SchneiH2 Posted December 19, 2015 Author Report Posted December 19, 2015 ?????You wrote Gizmo is NOT running in 64 bit but I have XP10 32-bit. So it should work!?Best regardsSHJ Quote
ilias.tselios Posted December 19, 2015 Report Posted December 19, 2015 Probably Cameron meant Gizmo runs only in 64-bit. Quote
SchneiH2 Posted December 19, 2015 Author Report Posted December 19, 2015 Hi airfighterIs there anything similar 'simple' like Gizmo+LUA for a 32-bit version?Thanks and regardsSHJ Quote
ilias.tselios Posted December 19, 2015 Report Posted December 19, 2015 I don't think that there is something like that available. Better ask to Gizmo Support forums for that. Quote
SchneiH2 Posted December 20, 2015 Author Report Posted December 20, 2015 Thank you very much for your comments. Indeed, it seems that it is (Christmas) time for an upgrade to the 64-bit version. Best regardsSHJ Quote
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.