SkateZilla Posted October 27, 2012 Share Posted October 27, 2012 So the Wunderluft has: Guns = {gun_mount("ADEN", { count = 1000, muzzle_pos_connector = "Gun1", muzzle_pos = {4.052, -0.381, -0.57}, elevation_initial = 2.000, supply_position = {1, 0, 0}, effect_arg_number = 350, } ) }, ok, now how do I do it if I want 4 guns, and for some reason, the one that is placed fires from 0,0,0 in my Module instead of the coordinates above, and I have a POINT _ connector at those coordinates with matching name... So... What Am I Doing wrong. Windows 10 Pro, Ryzen 2700X @ 4.6Ghz, 32GB DDR4-3200 GSkill (F4-3200C16D-16GTZR x2), ASRock X470 Taichi Ultimate, XFX RX6800XT Merc 310 (RX-68XTALFD9) 3x ASUS VS248HP + Oculus HMD, Thrustmaster Warthog HOTAS + MFDs Link to comment Share on other sites More sharing options...
SVKSniper Posted October 27, 2012 Share Posted October 27, 2012 I have same problem Skate..... Support my work Link to comment Share on other sites More sharing options...
HungaroJET Posted October 27, 2012 Share Posted October 27, 2012 (edited) I have same problem Skate..... Why R U not listening to me Sniper ? :D I wrote to you few weeks earlier ^ that description is wrong ! Try this: Guns = { gun_mount ("M_61", { count = 676 }, { muzzle_pos_connector = "Gun_Point" }, -- need to be "aimed" { muzzle_pos = {9.0, -0.067, -0.665} }, { supply_position = {5.8, 0.1, -0.58} }, -- ammo drum coord { elevation_initial = 3.0 } -- not possible if you use ("aimed") connector { effect_arg_number = 350 }, { max_burst_length = 200 }, ) }, Edited October 27, 2012 by HungaroJET Atop the midnight tarmac, a metal beast awaits. To be flown below the radar, to bring the enemy his fate. HAVE A BANDIT DAY ! [sIGPIC][/sIGPIC] "When I'm working on a problem, I never think about beauty. I think only how to solve the problem. But when I have finished, if the solution is not beautiful, I know it is wrong." - R. Buckminster Fuller (1895 - 1983), American Architect, Author, Designer, Inventor, and Futurist Link to comment Share on other sites More sharing options...
BR55Sevas Posted October 27, 2012 Share Posted October 27, 2012 (edited) muzzle_pos_connector = "Gun1", ....ok, now how do I do it if I want 4 guns.... In default Wunderluft there is not "Gun1", but "GUN_POINT" Open Wunderluft.edm in Modelviewer. Select View>>Show>>Show connectors Place your mouse on L-39 gun position, you`ll see connector named GUN_POINT. I`m not test it yet, but I supposed if you want four guns, then you have to create four connectors in your 3d model. If you get succes, share it plz. Edited October 27, 2012 by BR=55=Sevas МиГ-29 Fly by wire СДУ Su-27SM second display panel https://www.youtube.com/embed/videoseries?list=PL_2GGwNpWNp_fKXfRtDhIk8s5Jf4a9XHS http://berkuts.ru Пилотажный сервер с роботом | Aerobatic server with PhantomControl Link to comment Share on other sites More sharing options...
Pat01 Posted October 27, 2012 Share Posted October 27, 2012 @HungaroJet, Please, what do you mean by ..need to be "aimed" ? Is there a tag or something to set a dummy "aimed" in max ? Thanks. Link to comment Share on other sites More sharing options...
beczl Posted October 27, 2012 Share Posted October 27, 2012 See attached docs.How to use and assign Point Helper for your 3D Model.zip Link to comment Share on other sites More sharing options...
HungaroJET Posted October 27, 2012 Share Posted October 27, 2012 @HungaroJet, Please, what do you mean by ..need to be "aimed" ? You need to rotate connector to proper direction (in .EDM) ...that's all Atop the midnight tarmac, a metal beast awaits. To be flown below the radar, to bring the enemy his fate. HAVE A BANDIT DAY ! [sIGPIC][/sIGPIC] "When I'm working on a problem, I never think about beauty. I think only how to solve the problem. But when I have finished, if the solution is not beautiful, I know it is wrong." - R. Buckminster Fuller (1895 - 1983), American Architect, Author, Designer, Inventor, and Futurist Link to comment Share on other sites More sharing options...
SkateZilla Posted October 27, 2012 Author Share Posted October 27, 2012 In default Wunderluft there is not "Gun1", but "GUN_POINT" Open Wunderluft.edm in Modelviewer. Select View>>Show>>Show connectors Place your mouse on L-39 gun position, you`ll see connector named GUN_POINT. I`m not test it yet, but I supposed if you want four guns, then you have to create four connectors in your 3d model. If you get succes, share it plz. Im not using the Wunderluft EDM, Im Using the Wunderluft template. as for For guns I was worried about the LUA Syntax, do i just Do four blocks or do I have to add a {1} {2} {3} {4} somewhere. Windows 10 Pro, Ryzen 2700X @ 4.6Ghz, 32GB DDR4-3200 GSkill (F4-3200C16D-16GTZR x2), ASRock X470 Taichi Ultimate, XFX RX6800XT Merc 310 (RX-68XTALFD9) 3x ASUS VS248HP + Oculus HMD, Thrustmaster Warthog HOTAS + MFDs Link to comment Share on other sites More sharing options...
Mt5_Roie Posted October 27, 2012 Share Posted October 27, 2012 I'm curious about this also. Would like to know how to have multiple guns on an aircraft. Coder - Oculus Rift Guy - Court Jester Link to comment Share on other sites More sharing options...
beczl Posted October 27, 2012 Share Posted October 27, 2012 Guns = {gun_mount("GSh_23_2", { count = 250, muzzle_pos_connector = "GUN_POINT1", muzzle_pos = {2.588, -0.53, 0.0}, elevation_initial = 2.000, supply_position = {1.42, 0.50, -0.33}, effect_arg_number = 350, max_burst_length = 25, drop_cartridge = cartridge_30mm, } ) }, {gun_mount("GSh_23_2", { count = 250, muzzle_pos_connector = "GUN_POINT2", muzzle_pos = {2.588, -0.53, 0.0}, elevation_initial = 2.000, supply_position = {1.42, 0.50, -0.33}, effect_arg_number = 350, max_burst_length = 25, drop_cartridge = cartridge_30mm, } ) }, {gun_mount("GSh_23_2", { count = 250, muzzle_pos_connector = "GUN_POINT3", muzzle_pos = {2.588, -0.53, 0.0}, elevation_initial = 2.000, supply_position = {1.42, 0.50, -0.33}, effect_arg_number = 350, max_burst_length = 25, drop_cartridge = cartridge_30mm, } ) }, {gun_mount("GSh_23_2", { count = 250, muzzle_pos_connector = "GUN_POINT4", muzzle_pos = {2.588, -0.53, 0.0}, elevation_initial = 2.000, supply_position = {1.42, 0.50, -0.33}, effect_arg_number = 350, max_burst_length = 25, drop_cartridge = cartridge_30mm, } ) }, Link to comment Share on other sites More sharing options...
Pat01 Posted October 27, 2012 Share Posted October 27, 2012 HungaroJet & beczl thanks, keep the tips coming. Now I have my gun nozzle well located. Trying to get it follow the hud pipper. Link to comment Share on other sites More sharing options...
Mt5_Roie Posted October 27, 2012 Share Posted October 27, 2012 Beczl, Is there another location where we need to declare how many guns there are? I used the following code (yours modified) and am only getting one gun firing. It seems to fire the amount of bullets correctly and the right burst...but only one gun. Guns = {gun_mount("GSh_23_2", { count = 250, muzzle_pos_connector = "Gun001", muzzle_pos = {4.052, -0.381, -0.57}, elevation_initial = 2.000, supply_position = {1.42, 0.50, -0.33}, effect_arg_number = 350, max_burst_length = 25, drop_cartridge = cartridge_30mm, } ) }, {gun_mount("GSh_23_2", { count = 250, muzzle_pos_connector = "Gun002", muzzle_pos = {3.859, -0.381, -0.35}, elevation_initial = 2.000, supply_position = {1.42, 0.50, -0.33}, effect_arg_number = 350, max_burst_length = 25, drop_cartridge = cartridge_30mm, } ) }, {gun_mount("GSh_23_2", { count = 250, muzzle_pos_connector = "Gun003", muzzle_pos = {3.859, -0.381, 0.35}, elevation_initial = 2.000, supply_position = {1.42, 0.50, -0.33}, effect_arg_number = 350, max_burst_length = 25, drop_cartridge = cartridge_30mm, } ) }, {gun_mount("GSh_23_2", { count = 250, muzzle_pos_connector = "Gun004", muzzle_pos = {4.052, -0.381, 0.57}, elevation_initial = 2.000, supply_position = {1.42, 0.50, -0.33}, effect_arg_number = 350, max_burst_length = 25, drop_cartridge = cartridge_30mm, } ) }, Coder - Oculus Rift Guy - Court Jester Link to comment Share on other sites More sharing options...
BR55Sevas Posted October 27, 2012 Share Posted October 27, 2012 Try to create Dummy for each gun in your 3d model and name it Gun001, Gun002 .... МиГ-29 Fly by wire СДУ Su-27SM second display panel https://www.youtube.com/embed/videoseries?list=PL_2GGwNpWNp_fKXfRtDhIk8s5Jf4a9XHS http://berkuts.ru Пилотажный сервер с роботом | Aerobatic server with PhantomControl Link to comment Share on other sites More sharing options...
SkateZilla Posted October 27, 2012 Author Share Posted October 27, 2012 STuuuuuuuuuupid Question, but does the connector Name HAVE to be GUN_POINTx? Windows 10 Pro, Ryzen 2700X @ 4.6Ghz, 32GB DDR4-3200 GSkill (F4-3200C16D-16GTZR x2), ASRock X470 Taichi Ultimate, XFX RX6800XT Merc 310 (RX-68XTALFD9) 3x ASUS VS248HP + Oculus HMD, Thrustmaster Warthog HOTAS + MFDs Link to comment Share on other sites More sharing options...
beczl Posted October 27, 2012 Share Posted October 27, 2012 STuuuuuuuuuupid Question, but does the connector Name HAVE to be GUN_POINTx? Yes. it must. Link to comment Share on other sites More sharing options...
SVKSniper Posted October 27, 2012 Share Posted October 27, 2012 Now i see where I had a problem.......bad code.....:doh: Thx Support my work Link to comment Share on other sites More sharing options...
SkateZilla Posted October 27, 2012 Author Share Posted October 27, 2012 You get it to work sniper? Windows 10 Pro, Ryzen 2700X @ 4.6Ghz, 32GB DDR4-3200 GSkill (F4-3200C16D-16GTZR x2), ASRock X470 Taichi Ultimate, XFX RX6800XT Merc 310 (RX-68XTALFD9) 3x ASUS VS248HP + Oculus HMD, Thrustmaster Warthog HOTAS + MFDs Link to comment Share on other sites More sharing options...
SVKSniper Posted October 28, 2012 Share Posted October 28, 2012 Yes Skilla, but for this time i have other priority....animation and scripting my cockpit... :D Support my work Link to comment Share on other sites More sharing options...
Alfa Posted October 28, 2012 Share Posted October 28, 2012 See attached docs. Thank you! :) Very useful information about the point connectors - finally got mine working :D JJ Link to comment Share on other sites More sharing options...
SkateZilla Posted October 28, 2012 Author Share Posted October 28, 2012 i think i got it working too, the smoke seems to come from the right area, from the pit i can clearly see 4 separate lines of tracers. from external view though the tracer line goes all the way back to the tail of my plane (must be a global draw effect) Windows 10 Pro, Ryzen 2700X @ 4.6Ghz, 32GB DDR4-3200 GSkill (F4-3200C16D-16GTZR x2), ASRock X470 Taichi Ultimate, XFX RX6800XT Merc 310 (RX-68XTALFD9) 3x ASUS VS248HP + Oculus HMD, Thrustmaster Warthog HOTAS + MFDs Link to comment Share on other sites More sharing options...
farias76 Posted October 28, 2012 Share Posted October 28, 2012 (edited) I followed the tutorial beczl, I added 4 GUN_POINT connector and add the following lines to the file lua template Wunderluft. I only work a gun_point and also by varying the values muzzle_pos = {1, -0.5, -1} does not move. :helpsmilie: Guns = {gun_mount("GSh_23_2", { count = 250, muzzle_pos_connector = "GUN_POINT1", muzzle_pos = {4.052, -0.381, -0.57}, elevation_initial = 2.000, supply_position = {1.42, 0.50, -0.33}, effect_arg_number = 350, max_burst_length = 25, drop_cartridge = cartridge_30mm, } ) }, {gun_mount("GSh_23_2", { count = 250, muzzle_pos_connector = "GUN_POINT2", muzzle_pos = {3.859, -0.381, -0.35}, elevation_initial = 2.000, supply_position = {1.42, 0.50, -0.33}, effect_arg_number = 350, max_burst_length = 25, drop_cartridge = cartridge_30mm, } ) }, {gun_mount("GSh_23_2", { count = 250, muzzle_pos_connector = "GUN_POINT3", muzzle_pos = {3.859, -0.381, 0.35}, elevation_initial = 2.000, supply_position = {1.42, 0.50, -0.33}, effect_arg_number = 350, max_burst_length = 25, drop_cartridge = cartridge_30mm, } ) }, {gun_mount("GSh_23_2", { count = 250, muzzle_pos_connector = "GUN_POINT4", muzzle_pos = {4.052, -0.381, 0.57}, elevation_initial = 2.000, supply_position = {1.42, 0.50, -0.33}, effect_arg_number = 350, max_burst_length = 25, drop_cartridge = cartridge_30mm, } ) }, {gun_mount("GSh_23_2", { count = 250, muzzle_pos_connector = "GUN_POINT5", muzzle_pos = {3.859, -0.381, 0.35}, elevation_initial = 2.000, supply_position = {1.42, 0.50, -0.33}, effect_arg_number = 350, max_burst_length = 25, drop_cartridge = cartridge_30mm, } ) }, Edited October 28, 2012 by farias76 Link to comment Share on other sites More sharing options...
SkateZilla Posted November 4, 2012 Author Share Posted November 4, 2012 For the Record, I noticed something funky with my Module today, despite 4 cannons, only 1 line of tracers.. So, I Spaced them out 3 m, 2m, -2m, -3m from the center, and only the first cannon would load using Beczl's code... digging around LUAs for AI Guns I fixed it by doing this: Guns = { gun_mount("M_39", {count = 250},{muzzle_pos = {2.588, -0.53, -3.0}},{elevation_initial = 2.000},{supply_position = {1.42, 0.50, -0.33}}), gun_mount("M_39", {count = 250},{muzzle_pos = {2.588, -0.53, -2.0}},{elevation_initial = 2.000},{supply_position = {1.42, 0.50, -0.23}}), gun_mount("M_39", {count = 250},{muzzle_pos = {2.588, -0.53, 2.0}},{elevation_initial = 2.000},{supply_position = {1.42, 0.50, 0.23}}), gun_mount("M_39", {count = 250},{muzzle_pos = {2.588, -0.53, 3.0}},{elevation_initial = 2.000},{supply_position = {1.42, 0.50, 0.33}}) },[/Code] As Long as it's forward facing cannon, you wont need connectors.. I spaced the coordinates out so I could see the separate Trails and confirm all 4 cannons are firing from correct positions entered into the mount info. Screenshot Attached. Windows 10 Pro, Ryzen 2700X @ 4.6Ghz, 32GB DDR4-3200 GSkill (F4-3200C16D-16GTZR x2), ASRock X470 Taichi Ultimate, XFX RX6800XT Merc 310 (RX-68XTALFD9) 3x ASUS VS248HP + Oculus HMD, Thrustmaster Warthog HOTAS + MFDs Link to comment Share on other sites More sharing options...
HungaroJET Posted November 4, 2012 Share Posted November 4, 2012 digging around LUAs for AI Guns I fixed it by doing this: hehe, yeah :hehe: http://forum.lockon.ru/showpost.php?p=1588605&postcount=3 Atop the midnight tarmac, a metal beast awaits. To be flown below the radar, to bring the enemy his fate. HAVE A BANDIT DAY ! [sIGPIC][/sIGPIC] "When I'm working on a problem, I never think about beauty. I think only how to solve the problem. But when I have finished, if the solution is not beautiful, I know it is wrong." - R. Buckminster Fuller (1895 - 1983), American Architect, Author, Designer, Inventor, and Futurist Link to comment Share on other sites More sharing options...
farias76 Posted November 4, 2012 Share Posted November 4, 2012 Thank you SkateZilla !!!!!!!!!!!!!!!!!! Link to comment Share on other sites More sharing options...
SkateZilla Posted November 4, 2012 Author Share Posted November 4, 2012 (edited) hehe, yeah :hehe: http://forum.lockon.ru/showpost.php?p=1588605&postcount=3 I tried yours and it seemed to not wanna work (But I prolly forgot to clean up one of the open/close brackets, when i pasted it,, So I may have overlooked trying your code again.). Beczl's block worked, but he had open/close brackets at the beginning/end of each gun mount which causes my module to only load the first gun. My making it Guns = { gun1({data1},{data2}), gun2({data1},{data2}), gun3({data1},{data2}), gun4({data1},{data2}) } all mounts are loaded and works which i got that syntax from the AI Guns Data blocks, then it was just a matter of formatting out the un-needed/incorrect stuff that was causing problems. Ie: aircraft_guns("P_51B", --left wing gun_mount("M_2", { count = 270 },{muzzle_pos = {5.421, 0.001,-0.306}}), --outboard gun_mount("M_2", { count = 270 },{muzzle_pos = {-0.028, -0.447, -2.032}}), --inboard --right wing gun_mount("M_2", { count = 270 },{muzzle_pos = {-0.028, -0.447, 2.032}}), --inboard gun_mount("M_2", { count = 270 },{muzzle_pos = {5.421, 0.001, 0.306}}) --outboard ); We dont need the Aircraft Call for "P_51B" So: guns =( --left wing gun_mount("M_2", { count = 270 },{muzzle_pos = {5.421, 0.001,-0.306}}), --outboard gun_mount("M_2", { count = 270 },{muzzle_pos = {-0.028, -0.447, -2.032}}), --inboard --right wing gun_mount("M_2", { count = 270 },{muzzle_pos = {-0.028, -0.447, 2.032}}), --inboard gun_mount("M_2", { count = 270 },{muzzle_pos = {5.421, 0.001, 0.306}}) --outboard ); didnt work, caused a Crash as soon as you fired cannons. So I Tried One Cannon and replaced () with {} and removed the data block separator ";" guns ={gun_mount("M_2", { count = 270 },{muzzle_pos = {5.421, 0.001,-0.306}})} That worked. So I copied the line to make a second Cannon, and made it on the opposite side So: guns ={gun_mount("M_2", { count = 270 },{muzzle_pos = {5.421, 0.001,-0.306}})} {gun_mount("M_2", { count = 270 },{muzzle_pos = {5.421, 0.001, 0.306}})} That didnt work, it only loaded the first cannon, then i realized, the first open bracket was for the guns block, and that closing after the first cannon would end the guns block, and the rest of the mounts would be ignored. So, I reformatted the Syntax and moved the open/close brackets to their own line so they wouldn't be accidentally added to the gun_mounts, which led me to this: guns ={ gun_mount("M_2", { count = 270 },{muzzle_pos = {5.421, 0.001,-0.306}}) gun_mount("M_2", { count = 270 },{muzzle_pos = {5.421, 0.001, 0.306}}) } This worked, from there it's just a matter of correctly adding new mount lines and data for your modules guns. Edited November 4, 2012 by SkateZilla Windows 10 Pro, Ryzen 2700X @ 4.6Ghz, 32GB DDR4-3200 GSkill (F4-3200C16D-16GTZR x2), ASRock X470 Taichi Ultimate, XFX RX6800XT Merc 310 (RX-68XTALFD9) 3x ASUS VS248HP + Oculus HMD, Thrustmaster Warthog HOTAS + MFDs Link to comment Share on other sites More sharing options...
Recommended Posts