Jump to content

Michelange

Members
  • Posts

    201
  • Joined

  • Last visited

Everything posted by Michelange

  1. Here is a tutorial i've made in french. And the translation may help you to understand your problem. How Installing Skin 1 - Why this tutorial, when Modman done everything ? - Well, not everything Modman. In fact, everything depends on how the package was created in Modmaker. Indeed there are two ways to create a Modman pack and following the method you get different results. - Have you ever installed packages and you realize that it replaces the existing skins, or crushed packs previously installed? If so this may interest you. - Be aware that this is only valid for new 3D models in .LOM (KA-50, Su-25 (T) and others). - Again, what follows is valid only for packs of skins, mods change of aircraft (ADA's Mod - Mod Pink_tigrou Sweden) do not fall into this category. 1.1 - The proper method - If the modder went to the end of things, he used the tutorial included in the Modmaker Modman and the skin will assist with skins already installed. - To check this, open the pack you downloaded and see if it contains Skin.lma7 and addon.lma3 files. If so, you can go quietly and install the package with Modman. 1.2 - The method to removal - If the modder has not taken the trouble, you will see that the package contains xxx.lua, yyy.skins and db_countries.lua files. - In this case, these files will overwrite your original files and you could overwrite and loose previously installed mod's. You can then use the manual method below or redo the package itself. - Most of the mods are done in this form and unfortunately lead to losses. Even modders well known in the community does not bother to use the modmaker procedure. 2 - How to install a package properly 2.1-installation manual *- Open the package and copy the zzz.CDDS file in the directory /bazar/world - If it does not exist, you can always compress the skins with ED's CDDS Studio or copy the BMP files into /temptextures. - A .CDDS file is a compressed pack of all BMP textures you need for a skin. *- Open the file config/graphics.cfg or config/graphics_bs.cfg (for Black Shark) - Find the following lines and add the statement of your pack.CDDS TextureCollections ( highFolder = ". \ \ Bazar \ \ TempTextures \ \"; common = ". \ \ Bazar \ \ World \ \ My_pack.cdds"; common = ". \ \ Bazar \ \ Terrain \ \ Surface \ \ LandTexturesBMP.cdds"; ..... *- Go to the directory /bazar/world/Shapes and find one to one yyy.skins files corresponding to those of the pack. ( for the Simod A-10, 4 files to edit A-10.skins, OBLOMOK-A-10-WING-L.skins, OBLOMOK-A-10-WING-R.skins and PTB-2000.skins for reservoirs. ) - Open the files one by one and compare the lines (this is and example from the KA-50): Skin {Value = 2.3; material = ("KA-50-lamp", "Standart", "KA-50-PAINT24-DEF-02.bmp"); material = ("KA-50-PAINT1", "Standart", "KA-50-PAINT24-DEF-01.bmp"); material = ("KA-50-PAINT1_M", "Standart", "KA-50-PAINT24-DEF-01.bmp"); ... material = ("KA-50_BORT_NUMBERs", "Standart", "KA-50_NUMBERS_DC.tga"); material = ("KA-50_SIGN.tga", "Standart", "KA-50_SIGN24.tga"); } - If there are new definitions of skins, simply copy the original file. (Note the numbers Value = X.Y), it can be used only once and in order. Skin ( value = 3.0; material = ("KA-50-lamp", "Standart", "KA-50-PAINT30-DEF-02.bmp"); material = ("KA-50-PAINT1", "Standart", "KA-50-PAINT30-DEF-01.bmp"); .... material = ("KA-50_BORT_NUMBERs", "Standart", "KA-50_Numbers23.tga"); material = ("KA-50_Turkey_Numbers", "Standart", "empty.tga"); ) - You have to understand that each skin number is made by a list of textures packed in a CDDS file or listed in the temptextures directory. - Be very careful if you notice if the file names of the textures are already used, extract the textures of the CDDS, rename them, repack and use the new texture names in the skins file. (this is most the case if the pack is a replacement pack of the original skins) *- Open Scrips/database/Helicopter/KA-50.lua (script/database/plane/plane_name.lua for aircraft A-10A.lua) Compare it with the pack, you will find additional lines, add them to the original. Again attention to numbers (the numbers in red are those from "value =" in the .skins file w/o the dot) ColorScheme = ( color_scheme ("(060AFECF BFBD-44c5-9C47-D9B5EF35D104)", _ ("Standard"), 0), ... color_scheme ("(7EB0DAD7-1FDF-9E45-4c1b-B1322A73AED4)", _ ("EURO Desert"), 30) *- Finally go to \Scripts\database\db_countries.lua - Looking for the country (do simply a search of USA for example) you want to assign the skin and the add (you can copy/paste relevant lines from the db_countries.lua Pack Helicopter = ( cnt_unit ("(3457BB1E-523F-4C24-BBEA-58D028623F05)", "Ka-50", ( color_scheme ("(060AFECF BFBD-44c5-9C47-D9B5EF35D104)", "Standard"), ... color_scheme ("(7EB0DAD7-1FDF-9E45-4c1b-B1322A73AED4)", "EURO Desert") )) cnt_unit("{8FDB2742-2283-450D-B417-CFC47774E8B6}", "A-10A" is the unit your searching each plane/helo has his own CLSID - It's long and tedious, but once you've mastered the method, all this will seem clearer and you'll want to go further and make your own packs. - By this method, I added a good fifty skins for DCS 3D models and FC2.0 2.2-Repeat pack - This method is explained in the tutorial of Skypat you find in the module of Modmaker Modman (click on the icon (?)) 3 - Compatibility DCS1.0.2 / FC1.2.1 - Most of the packs of skins are now compatible between the two sim's, yet it remains a small difference between the two and it is in the statement of CDDS files that this happens. - To use a package on FC2 or DCS you just have to compare two files graphics.cfg and graphics_bs.cfg.
  2. when you create the mission you have a new slot in the skin list of the F15. Correct ? That mean that the .lma7 works In your .CDDS you have 2 textures called JASDF-F15C-1-01.bmp and JASDF-F15C-2-01.bmp ? be shure of this. Put this 2 textures in the temptextures directory to verify if they are working. the problem is there. No, it's automaticaly generated by modmaker when you save as zip
  3. Right. But if the mod is only a zip file, Modman cant use it. Modmaker is there to create the informations needed by Modman to install corectly the pack. There is a .lma3 or .lma file generated by modmaker in the pack to give the infos to Modman
  4. Yes, and you have to use modmaker to do that, to show him where the file is( 1- choose addon file). Only this way modman know that he have to declare it in graphics.cfg
  5. Did you put the CDDS at the correct place Bazar\World ? And did you use Modmake and add the cdds in the pack with modmaker ? Only this way modman knows how to install the textures
  6. Good job :) Now it seem's that the new slot is there but not the textures What is writen at the end of F-15.Skins ? skin { value = 1.0; material = {"F15C_1", "standart", "JASDF-F15C-1-01.bmp"}; material = {"F15C_1_met", "standart", "JASDF-F15C-1-01.bmp"}; material = {"F15C_2", "standart", "JASDF-F15C-2-01.bmp"}; material = {"F15C_2_met", "standart", "JASDF-F15C-2-01.bmp"}; material = {"F15C_Numbers", "standart", "F15C-numbers-00.tga"}; material = {"F15C_lattice", "standart", "F15C-lattice-01.tga"}; material = {"F15C_Logo", "standart", "F15C-Logo-00.tga"}; material = {"F15C_Logo2", "standart", "F15C-Logo2-00.tga"}; } and in Scripts\Database\planes\F-15C.lua have you a line like : color_scheme("{DE957564-886B-11DF-876E-9908DFD72085}", _("JASDF black-green skin 1.0"), 10), if it's ok you have a problem with the name of the textures or the cdds is not declared in config/graphics.cfg common = ".\\Bazar\\World\\YourCDDS.cdds"; copy the BMP textures files in temptextures to test (if the textures are then visible the problem is in graphics.cfg, if not it's the name of the texture files) Did you put the CDDS at the correct place Bazar\World ? And did you use Modmake and add the cdds in the pack with modmaker ? Only this way modman knows how to install the textures
  7. Yes, it was my error. I didn't saw them. Normaly it's ok.
  8. Yes. file = Bazar\World\Shapes\F-15.skins argument = 70 otherfile1 = Bazar\World\Shapes\F-15-fonar.skins otherfile2 = Bazar\World\Shapes\F-15-OBLOMOK-WING-L.skins otherfile3 = Bazar\World\Shapes\F-15-OBLOMOK-WING-R.skins and at the end file = Scripts\Database\planes\F-15C.lua
  9. First of all look in bazar/world/shapes and open with the notebook the file F-15.skins to see the structure inside. [skin] file = Bazar\World\Shapes\F-15.skins argument = 70 2- this is the structure in F-15.skin l1= material = {"F15C_1", "standart", "F15C-1-your_texture_name.bmp"}; l2= material = {"F15C_1_met", "standart", "F15C-1-your_texture_name.bmp"}; l3= material = {"F15C_2", "standart", "F15C-2-your_texture_name.bmp"}; l4= material = {"F15C_2_met", "standart", "F15C-2-your_texture_name.bmp"}; l5= material = {"F15C_Numbers", "standart", "F15C-numbers-00.tga"}; l6= material = {"F15C_lattice", "standart", "F15C-lattice-01.tga"}; l7= material = {"F15C_Logo", "standart", "F15C-Logo-00.tga"}; l8= material = {"F15C_Logo2", "standart", "F15C-Logo2-00.tga"}; I copied the lines from skin n°10 in the F-15.skins it's the JASDF, but your skins are n°11 and 12 or other names like i wrote before. If you don't need Logo's you have to create a new empty logo.tga with alpha but first try the files above. Yes it's only a text file then [color_scheme] country = {EFADDFE6-9360-4523-8CAB-2D74182617FD} -- this is USA look in db_countries.lua cnt_unit = {CD247E45-4702-4E3A-A659-4F5E0E645D2B} -- this is F-15C look in db_countries.lua color_scheme = {6B802660-2340-4a22-AAD8-F6D9F8F26507} -- this is a totaly new key for your skin color_name = Your skin name file = Scripts\Database\planes\F-15C.lua is it ok now ? You have to make a pack for each skin and don't forget to create a new CLSID for the second skin like this {578ADFFD-0374-4be4-AA69-3F76BE0A8D58}
  10. PS : Be carefull your BMP texture files also must have new names and not F15C-1-01.BMP F15C-2-01.BMP but you could rename it : Topol-F15C-1-01.BMP , Topol-F15C-2-01.BMP, Topol-F15C-1-02.BMP , Topol-F15C-2-02.BMP or JASDF-F15C-1-01.BMP , JASDF-F15C-2-01.BMP, JASDF-F15C-1-02.BMP , JASDF-F15C-2-02.BMP
  11. No, you don't need other files. Read the doc in Modman's MOD MAKER. The .lma7 must contain all the informations that modman need to add a new skin and modmann will add the needed lines in the correct files, it do it for you. You have to create this .lma7 file. There is also a tutorial in. You can also download some Black Shark skins on lockonfiles.com, some modder's have used this procedure to add new skins in DCS BS then you have some examples. If you only add skins using .lma7 file is the correct way, you are not overwriting users db_Countries.lua for example but modman only add's the needed lines. Some user's, like me, have some changes in the db_countries.lua or other files, that's why i always must take care how the mod was packed and many times i must install it manualy due to a bad use of mod maker. For example : I have added some skins on 3GO's Su-27. If you pack your db_countries.lua in your modman package, i will lost all this skins. If you use the .lma7 mod maker procedure i dont.
  12. - Yes .CDDS loads faster. - You can create New skins with new names and you can assign it on the country you want. - In Modman's MOD MAKER you have a little Icon with a (?). There is a doc file in who's explain you how to create a .lma7 file. Modman needs this file to install a NEW Skin on a country. - With NEW i mean NO replacement but an add of a new one.
  13. Hey, this planes were also in my todolist, specifically the last one. I saw your JASDF thread and there are also some beautiful copters to do. Once done i'll use it in the right countrie. :) Nice job :))))
  14. Yes with Mirage IV from mod les Mirages. It works well as AI. I didn't test it in a specific mission now (Bombing, Reco etc...).
  15. 1° - Use XML Maker and goto : Units -> Planes -> Plane -> Name ="F-15C" -> ColorSchemes You will find sothing like this : <ColorScheme CLSID="{A7C18417-3EA1-4B2B-B2FE-2D68E35ACCD1}" ID="9" Name="IDF/AF F15 Standard" /> <ColorScheme CLSID="{2e57406b-0ad2-4531-8dc4-e9ba59be6167}" ID="0" Name="32nd TFS (CR) AB Soesterberg (early)" /> <ColorScheme CLSID="{3506c4fe-4c3a-4d79-b232-fd000ec65b9c}" ID="1" Name='58th FS "Gorillas" (EG) AFB Eglin' /> <ColorScheme CLSID="{abd15535-a4ba-451a-8583-6d796c35747b}" ID="2" Name='59th FS "Proud Lions" (EG) AFB Eglin' /> <ColorScheme CLSID="{8238d333-c109-43dc-8cae-74e92799270a}" ID="3" Name='27th FS "Fighting Eagles" (FF) AFB Langley' /> <ColorScheme CLSID="{a4492e44-06bd-4ed8-b744-f5fd4be4b2c8}" ID="4" Name='71th FS "The Ironmen" (FF) AFB Langley' /> <ColorScheme CLSID="{c0ee4ef9-9328-4a38-871e-1dfbd1efd41f}" ID="5" Name='67th FS "Fighting Cocks" (ZZ) AB Kadena' /> <ColorScheme CLSID="{1a27ede8-236a-42c6-b7c5-2f2f2620fd26}" ID="6" Name="48th FW 493rd FS (LN) RAF Lakenheath (GB)" /> <ColorScheme CLSID="{2a31c5f8-df20-4af3-bd7d-ccbb8a64b5cf}" ID="7" Name='52th FW "The Tigers" (SP) AB Spangdahlem' /> <ColorScheme CLSID="{8e75a77d-c944-4f43-9441-787e03d6b68f}" ID="8" Name="54th FS (AK) AFB Elmendorf (early)" /> You can let it, i thing it schould work. The bellow onces are from FC2 F15-C.lua you can compare. color_scheme("{2e57406b-0ad2-4531-8dc4-e9ba59be3535}", _("48th FW 493rd FS Lakenheath"), 0), color_scheme("{3506c4fe-4c3a-4d79-b232-fd000ec63535}", _("173th FW ANG Oregon"), 1), color_scheme("{abd15535-a4ba-451a-8583-6d796c353535}", _("57th FW 65th Aggressors 28"), 2), color_scheme("{AK475535-a4ba-451a-8583-6d796c35AK47}", _("57th FW 65th Aggressors 10"), 3), color_scheme("{A7C18417-3EA1-4B2B-B2FE-2D68E35ACCD1}", _("IDF/AF F15 Spearhead Squadron"), 4), color_scheme("{AK478417-3EA1-4B2B-B2FE-2D68E35AAK47}", _("IDF/AF F15 Double Tail squadron"), 5), color_scheme("{M166c4fe-4c3a-4d79-b232-fd000ec63M16}", _("173th FW ANG Oregon Shark"), 6), color_scheme("{ALASKAfe-4c3a-4d79-b232-fd000eALASKA}", _("3th FW 19 FS Elmendorf"), 7), color_scheme("{Fictiona-4c3a-4d79-b232-fd000eALASKA}", _("Fictional DC"), 8), color_scheme("{JASDF4fe-4c3a-4d79-b232-fd000ecJASDF}", _("JASDF F-15J 303SQ"), 9), 2°- Goto countries -> Countrie -> Name ="USA" -> Units -> planes -> Plane -> F-15C -> ColorShemes You will see : <ColorScheme CLSID="{2e57406b-0ad2-4531-8dc4-e9ba59be6167}">32nd TFS (CR) AB Soesterberg (early)</ColorScheme> <ColorScheme CLSID="{3506c4fe-4c3a-4d79-b232-fd000ec65b9c}">58th FS "Gorillas" (EG) AFB Eglin</ColorScheme> <ColorScheme CLSID="{abd15535-a4ba-451a-8583-6d796c35747b}">59th FS "Proud Lions" (EG) AFB Eglin</ColorScheme> <ColorScheme CLSID="{8238d333-c109-43dc-8cae-74e92799270a}">27th FS "Fighting Eagles" (FF) AFB Langley</ColorScheme> <ColorScheme CLSID="{a4492e44-06bd-4ed8-b744-f5fd4be4b2c8}">71th FS "The Ironmen" (FF) AFB Langley</ColorScheme> <ColorScheme CLSID="{c0ee4ef9-9328-4a38-871e-1dfbd1efd41f}">67th FS "Fighting Cocks" (ZZ) AB Kadena</ColorScheme> <ColorScheme CLSID="{1a27ede8-236a-42c6-b7c5-2f2f2620fd26}">48th FW 493rd FS (LN) RAF Lakenheath (GB)</ColorScheme> <ColorScheme CLSID="{2a31c5f8-df20-4af3-bd7d-ccbb8a64b5cf}">52th FW "The Tigers" (SP) AB Spangdahlem</ColorScheme> <ColorScheme CLSID="{8e75a77d-c944-4f43-9441-787e03d6b68f}">54th FS (AK) AFB Elmendorf (early)</ColorScheme> You can compare it with those in FC2's db_Contries.lua color_scheme("{2e57406b-0ad2-4531-8dc4-e9ba59be3535}", _("48th FW 493rd FS (LN) RAF Lakenheath (GB)"), 0), color_scheme("{3506c4fe-4c3a-4d79-b232-fd000ec63535}", _("173th FW ANG Oregon"), 1), color_scheme("{abd15535-a4ba-451a-8583-6d796c353535}", _("57th FW 65th Aggressors 28"), 2), color_scheme("{AK475535-a4ba-451a-8583-6d796c35AK47}", _("57th FW 65th Aggressors 10"), 3), color_scheme("{M166c4fe-4c3a-4d79-b232-fd000ec63M16}", _("173th FW ANG Oregon Shark"), 6), color_scheme("{ALASKAfe-4c3a-4d79-b232-fd000eALASKA}", _("3th FW 19 FS Elmendorf"), 7), color_scheme("{Fictiona-4c3a-4d79-b232-fd000eALASKA}", _("Fictional DC"), 8), color_scheme("{JASDF4fe-4c3a-4d79-b232-fd000ecJASDF}", _("JASDF F-15J 303SQ"), 9), 3° - Goto countries -> Countrie -> Name ="Israel" -> Units -> planes -> Plane -> F-15C -> ColorShemes You have 1 skin <ColorScheme CLSID="{A7C18417-3EA1-4B2B-B2FE-2D68E35ACCD1}">IDF/AF F15 Standart</ColorScheme> In FC2's db_countries.lua you have 2 skins color_scheme("{A7C18417-3EA1-4B2B-B2FE-2D68E35ACCD1}", "IDF/AF F15 Standart1"), color_scheme("{AK478417-3EA1-4B2B-B2FE-2D68E35AAK47}", "IDF/AF F15 Standart2"), Be carefull you have to respect the XML Syntax. The best way is to open Meinit twice with XML Maker the in game Meinit and the MOd's.Zip one and compare/copy/paste the above lines.
  16. Correct, In db_countries.lua there are Su-25, Su-25T, An-26B and Yak-40 for Georgia, that's it.
  17. For the latest news Batou intended to extend the map (East or Sud). He continues to work on Rivers and roads. After that the next step should be airports. No, he didn't start this issue. He's working with ED's terrain tools for DCS BS and FC. Don't know if DCS A-10C is compatible. On my side I continue to work the new countries to add in. (recently added the ground troops (Vehicles)) Some skins for the Su-27 (Done 2 Uzbekistan and 1 Azerbaidjan skins), and think add China and Indian skins. Su-25 skins are also programmed. And hoping that a New Mig-29 and F-16 3Dmodel will be avalaible to skin. There are many Mig-29 in the region.
  18. My question is simple : HOW can I create a AI Escort of 2 Mig-25 for the A-50 in the Mission Editor of DCS or FC2 ?
  19. This may help you : DCS BLACK SHARK – ADDING CUSTOM SKINS start read from page 23 In 3DSmax -> Material editor -> you load your skins in Bitmap Texture1.BMP and Texture2.BMP. (this are your main names) In the .skins file the firts skin will be Variant1Texture1 and Variant1Texture2 the second is Variant2Texture1 and Variant2Texture2 etc... You dont have to declare all your variants in 3DSMAX (only a generic name of the textures), the .skins file is there to define de correspondance between the skins and slots in game.
  20. No. Go to Check six Téléchargement (download) / Catégorie -> Lockon / Type -> Skin / Skin -> Su-27 you will find 37 skins for the flanker espacely Venezuela, Angola, Splinter and also Alexandra's skins. Some Old but very hight quality : AFSR
  21. Argument 70 is the skin argument. You can test it with ED's model viewer Go to argument 70 and test 0 to 1 value you will understand. The .skin file will declare the Argument 70's values for the game. Only old CMD files have the argument 70 values inside. No, one matérial. the .skins file is there for assign 10 textures to the same material. If you're using more than one texture you have to declare all. Show me your texture files and I will help you. How many skins do you have and for one skin how many textures do you have ? For example : For one F-15 Skin there are 2 texture files
  22. John_X, can you post the name of your texture files ? First you have to create a .skins with the same name of your 3D model (example F-16C.skins) In side you have : models { lod = {"F-16C", 1000000}; collision = "F-16-COLLISION"; } argument { argument = 70; skin { value = 0.0; material = {"F16C", "standart", "F16C-01.bmp"}; } skin { value = 0.1; material = {"F16C", "standart", "F16C-02.bmp"}; } } F16C is the name of your texture in 3DSmax You have 10 standart slots value = 0.0 to 0.9, dont change it and your work will be easy. You have to look in the 2 F-16C.lua files in \Scripts\Database\planes there you will see witch skin is assigned to witch AB or Country in F-16C-2.lua : color_scheme("{E45A7ECE-4199-4257-937D-5207435A5786}", _("IDF/AF F16C Standard"), 9), color_scheme("{eeaab67f-6f15-4a5d-9b74-1c08ee971e9b}", _("USAFE 555th FS (AV) Aviano AFB"), 0), color_scheme("{189e0024-e439-494c-8b7e-817a2884ab85}", _("PACAF 14th FS (MJ) Misawa AFB"), 1), color_scheme("{65a85d13-351d-450d-84f9-c5cc528228cf}", _("PACAF 35th FW (WW) Misawa AFB"), 2), color_scheme("{89c5ff57-d84c-4950-8109-dafd18e40143}", _("USAF 77th FS (SW) Shaw AFB"), 3), color_scheme("{356613e0-28af-4ca1-ac5d-1c590bb213c6}", _("USAFE 22nd FS (SP) Spangdahlem AFB"), 4), color_scheme("{382e7a6a-b29f-4881-9c28-d9ea192bc4c6}", _("USAF 414th CTS (WA) Nellis AFB"), 5), color_scheme("{924ed5b8-c371-4315-b29f-c0be4ecb188d}", _("USAF 412th TW (ED) Edwards AFB"), 6), color_scheme("{d00a836b-6c9c-40f9-a8c5-39501ae3a178}", _("USAF 147th FIG (EF) Ellington AFB"), 7), F-16C.lua color_scheme("{B7735F37-899E-4375-AAB5-F0ABB268C258}", _("Standard"), 0), color_scheme("{B49DF322-F82E-4ceb-9BE3-1CC566F30515}", _("Standard Belgium"), 2), color_scheme("{D8380D76-409C-4ca2-B8B9-E8C4DFEADD43}", _("AF F16 Standard"), 8), You can add more textures but the you have to create new CLSID key's. If you need hel contact me by MP.
  23. Su-25 is a new 3D model, that means new texture files and not compatible with the old Su-25 from FC1.12
  24. For a newly installed FC2 (non moded) the 3D models are mostly the same as in FC1.12 only new DCS / BS models are changed. That mean's that there are no differences for skins and usage of it if you dont change the 3D model. - FC1.12 plane skins are working w/o problems. - DCS KA50 skins also. You mean repaint ? Then NO.
  25. Here you have a last version to give you an Idee how you can manage 3 or 4 or more states. I've not tested this now but should be correct. For this i added a new value called MaxState = 3 or 4 Explanation of the attached file, I made the relations visible vith colors -- testing witch plane and assign conditions if self.plane == "a10a" then -- is my plane the A-10 ? onTime = 0.1; -- Time light on offTime = 0.2; -- Time light off MaxState = 3; -- Maximum 3 states for A-10 else if self.plane == "F15C" then -- is my plane the F-15 ? onTime = 0.1; -- Time light on offTime = 0.2; -- Time light off MaxState = 4; -- Maximum 4 states for F-15 else -- the plane is not the F-15 or A-10 onTime = 0.9; -- Time light on offTime = 1.9; -- Time light off MaxState = 4; -- Maximum 4 states end -- end of the test -- now testing the plane if atAir and masterMode == "NAV" and self.plane ~= "su25" then -- NEW : testing the number of states if MaxState = 3 then -- here we have only 3 states if ( self.lightState == 0 and Timer - self.lastCycleTime >= onTime ) then LoSetCommand( 175 ); self.lightState = 1; self.lastCycleTime = Timer; elseif ( self.lightState == 1 and Timer - self.lastCycleTime >= onTime ) then LoSetCommand( 175 ); self.lightState = 2; self.lastCycleTime = Timer; elseif ( self.lightState == 2 and Timer - self.lastCycleTime >= onTime ) then LoSetCommand( 175 ); self.lightState = 3; self.lastCycleTime = Timer; elseif ( self.lightState == 3 and Timer - self.lastCycleTime >= offTime ) then self.lightState = 0; self.lastCycleTime = Timer; end else -- here we have 4 states if ( self.lightState == 0 and Timer - self.lastCycleTime >= onTime ) then LoSetCommand( 175 ); self.lightState = 1; self.lastCycleTime = Timer; elseif ( self.lightState == 1 and Timer - self.lastCycleTime >= onTime ) then LoSetCommand( 175 ); self.lightState = 2; self.lastCycleTime = Timer; elseif ( self.lightState == 2 and Timer - self.lastCycleTime >= onTime ) then LoSetCommand( 175 ); self.lightState = 3; self.lastCycleTime = Timer; elseif ( self.lightState == 3 and Timer - self.lastCycleTime >= onTime ) then LoSetCommand( 175 ); self.lightState = 4; self.lastCycleTime = Timer; elseif ( self.lightState == 4 and Timer - self.lastCycleTime >= offTime ) then self.lightState = 0; self.lastCycleTime = Timer; end end end BlinkLight2.zip
×
×
  • Create New...