Cougar Posted November 16, 2013 Posted November 16, 2013 (edited) Hi guys, First of all I would like to say thank you to everyone who posted snippets and answered question that I had in this section which helped me alot as Im no expert in lua scripting. The script is far from being complete IMO but wife isnt happy about it so that's why Im posting it and maybe someone can continue to work on it to give it more content faster than me ;) Important note: I haven't tested it on multiplayer scale so there might be some bugs....crossing fingers there's none lol but just a note of caution ;) So what the script is about? Training indeed :) and is based on the assets of the 476th vFG Air Weapons Range Objects So far it's pretty much setup for gun strafing training for planes and helicopters but could be expanded for rockets and possibly a good mix with SNAFU's Bdu bomb pratice script. This script is basicaly counting every hit you get with your gun rounds(for now) when you are lined up correctly with the target you intend to hit. To ensure people hitting the right target, I've setup zones before the targets and only when you're inside the hit will be counted. Important note here, the first unit inside a zone will be the only one to be able to make hits, if there's a second unit at the same time in the target zone, his hit wont be counted if he fires but as soon the unit leaves the second unit name will be entered in the list and only then his hit will count. You can view your total hit count for each target with the F-10 comms menu which are specific to planes or helicopters. You can also reset all your hit counts also. I've thought about resetting the score of the plane once it get to a specific distance but I haven't had the time to make it happen though it might be better that way. The only options which might be good is to reset when players select another aircraft but it has to be implemented ;) I've also added one IPplanes and one IPheli unit which can act as the tower through the F7 view to direct pilots in or to train them. These 2 units will receive message when units enter target zones with there Intended target, unit name(not player name) and hit count. New message will overwrite the initial message in the same format once hits are being made. Anyways the best way to describe it is to let you guys have a go at it ;) What You'll need: - Mist 3.2 with small hot fix for mist.message.add attached in this post - 476th vFG Air Weapons Range Objects - attached files I like the do script better then the do script file so I'll attach the revelant files here but everything is set in the ME trigger section. Planes/Helicopters name F-15C = Eagle1, Eagle2 A-10A = Hawg1, Hawg2 A-10C = Hawg3, Hawg4 P-51D = Mustang1, Mustang2 SU-25T = Frog1, Frog2 Mig-29 = Fulcrum1, Fulcrum2 SU-27 = Flanker1, Flanker2 SU-33 = Flanker3, Flanker4 UH-1H = Huey1, Huey2 MI-8 = Hip1, Hip2 KA-50 = Shark1, Shark2 Planes Targets name Strafe Pit = StrafePit1,StrafePit2,StrafePit3,StrafePit4 Tac Strafe Soft = TacStrafeS1 Tac Strafe Hard = TacStrafeH1 Helicopters Targets name Strafe Pit = HStrafePit1,HStrafePit2 Tac Strafe Soft = HTacStrafeS1, HTacStrafeS2 Tac Strafe Hard = HTacStrafeH1, HTacStrafeH2 Door Gunner = SG1, SG2, SG3, SG4, SG5, SG6 Planes Targets zone name Strafe Pit = StrafePit1: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14 StrafePit2: 21, 22, 23, 24, 25, 26, 27, 28, 29, 210, 211, 212, 213, 214 StrafePit3: 31, 32, 33, 34, 35, 36, 37, 38, 39, 310, 311, 312, 313, 314 StrafePit4: 41, 42, 43, 44, 45, 46, 47, 48, 49, 410, 411, 412, 413, 414 Tac Strafe Soft = TacStrafeS1: TS11, TS12, TS13, TS14, TS15, TS16, TS17 Tac Strafe Hard = TacStrafeH1:TH11, TH12, TH13, TH14, TH15, TH16, TH17 Helicopters Targets zone name Strafe Pit = HStrafePit1: HSP11, HSP12, HSP13, HSP14, HSP15, HSP16, HSP17 HStrafePit2: HSP21, HSP22, HSP23, HSP24, HSP25, HSP26, HSP27 Tac Strafe Soft = HTacStrafeS1:HTS11, HTS12, HTS13, HTS14, HTS15, HTS16, HTS17 HTacStrafeS2:HTS21, HTS22, HTS23, HTS24, HTS25, HTS26, HTS27 Tac Strafe Hard = HTacStrafeH1:HTH11, HTH12, HTH13, HTH14, HTH15, HTH16, HTH17 HTacStrafeH2:HTH21, HTH22, HTH23, HTH24, HTH25, HTH26, HTH27 Door Gunner = HFoul1, HFoul2 I hope you guys find some potential in that script and any comments or hints is appreciated. P.S.: I think I forgot to change the mission settings so sorry if that's the case...getting late here. Cheers!Training Range Script.rarTraining_Range_Script.mizMistv3_2.lua Edited November 24, 2013 by Cougar 1
Cougar Posted November 16, 2013 Author Posted November 16, 2013 Nice ;) can't wait to see your modification ;)
wolle Posted November 16, 2013 Posted November 16, 2013 Hi guys, What You'll need: - Mist 3.2 with small hot fix for mist.message.add attached in this post - 476th vFG Air Weapons Range Objects - attached files Hi Cougar, Out of curiosity, what was the problem with mist.message.add before the hot fix? [sIGPIC][/sIGPIC] Intel Core I7 4820K @4.3 GHz, Asus P9X79 motherboard, 16 GB RAM @ 933 MHz, NVidia GTX 1070 with 8 GB VRAM, Windows 10 Pro
ENO Posted November 16, 2013 Posted November 16, 2013 Not sure if I can put it to immediate use but I sure appreciate the effort you put in! It's guys like you, mbot, st3ve, gelexo (I never spell his name right) who keep the capabilities of this sim from getting stale. Thanks again coug. "ENO" Type in anger and you will make the greatest post you will ever regret. "Sweetest's" Military Aviation Art
Cougar Posted November 16, 2013 Author Posted November 16, 2013 Hi Cougar, Out of curiosity, what was the problem with mist.message.add before the hot fix? http://forums.eagle.ru/showthread.php?t=116119 near bottom first page and answer of Grimes second page
Cougar Posted November 16, 2013 Author Posted November 16, 2013 Not sure if I can put it to immediate use but I sure appreciate the effort you put in! It's guys like you, mbot, st3ve, gelexo (I never spell his name right) who keep the capabilities of this sim from getting stale. Thanks again coug. ;)
K2mil Posted November 24, 2013 Posted November 24, 2013 could you guys explain how to make it work INTEL CORE I7 6700K ASUS ROG MAXIMUS VIII HERO ASUS ROG GTX1080Ti Strix OC 16GB @ 4100 MHz |CORSAIR Intel 730 SSD 240GB Corsair 850 W Modular PSU Corsair Obsidian 650d Logitech X-56 HOTAS ,Saitek X-65F HOTAS, Pro Ruder Pedals, Pro Flight Instrument Panel NP TrackIr 5 Pro Windows 10 PRO
Zaz0 Posted December 1, 2013 Posted December 1, 2013 Nice Cougar. I modifed the BDU script so that it gives both the distance and clock position of bombs. It also calls "no spot" for off-target misses, as well as "bullseye" for direct hits. It's only for use on the conventional circles though, so my next order of business was to get something going for the strafe pits. Looks like I wont have to reinvent the wheel. This is something nice that I miss from the FSX community...over there, freeware and payware devs alike help each other out in order to elevate the baseline knowledge of the community. Unfortunately, thats not something you see too much of around the DCS community. Any news on this upgrade? Will you share it? Thanks!
Cougar Posted December 1, 2013 Author Posted December 1, 2013 Reworking the script for the better.....will update the first post when done....
ENO Posted December 12, 2013 Posted December 12, 2013 Eh Coug... I'm going to run your mission on my server for a bit- well, as the backdrop of some of my emerging missions. I hope you don't mind but I want to be able to add / subtract some aircraft slots- but in doing so I imagine I'm going to need to adjust the script that's tracking these aircraft and add in the various names. Or is that even a factor? Anyway, just wanted to let you know it looks fantastic and I'm looking forward to flexing its muscles a bit in the MP environment in the next few days. "ENO" Type in anger and you will make the greatest post you will ever regret. "Sweetest's" Military Aviation Art
Cougar Posted December 12, 2013 Author Posted December 12, 2013 Eh Coug... I'm going to run your mission on my server for a bit- well, as the backdrop of some of my emerging missions. I hope you don't mind but I want to be able to add / subtract some aircraft slots- but in doing so I imagine I'm going to need to adjust the script that's tracking these aircraft and add in the various names. Or is that even a factor? Anyway, just wanted to let you know it looks fantastic and I'm looking forward to flexing its muscles a bit in the MP environment in the next few days. No it shouldnt be a problem to remove aircraft....as long the unit name remain the same if you add new items within the limits of the number of present in the mission..... Ive progressed a bit on the updated code but just lacking of time at the moment but new code will be better i assume ;)
ENO Posted December 12, 2013 Posted December 12, 2013 Okay so from what I'm reading as long as I maintain the existing unit names it doesn't matter what actual aircraft I'm using. Perhaps we can PM about where in the code I may need to go to modify it in the event that my additional aircraft expand beyond the existing ID's you currently use? "ENO" Type in anger and you will make the greatest post you will ever regret. "Sweetest's" Military Aviation Art
Cougar Posted December 12, 2013 Author Posted December 12, 2013 Okay so from what I'm reading as long as I maintain the existing unit names it doesn't matter what actual aircraft I'm using. Correct Perhaps we can PM about where in the code I may need to go to modify it in the event that my additional aircraft expand beyond the existing ID's you currently use? It will be something tricky unfortunatly....
ENO Posted December 12, 2013 Posted December 12, 2013 Okay well if I take the fighters out it should be okay and I'll rename the attack aircraft after them. How you coming along with your update? Any significant changes? "ENO" Type in anger and you will make the greatest post you will ever regret. "Sweetest's" Military Aviation Art
whartsell Posted December 12, 2013 Posted December 12, 2013 Correct It will be something tricky unfortunatly.... Dont want to step on this thread too much but I was inspired by Cougars script to make one that is a lot more flexible. I can share it with both of you if you would like. You can create any number of zones,targets, and units to be tracked. Most of the work is done in the ME (no messy triggers and such will need to be defined) then you just update 3 or 4 tables in the script and you are good to go. Currently it only supports aircraft gun types (no helis but that could be easilly changed). The script is also less than 300 lines of code vs 3000. If y'all(couldnt resist, I live in Texas) are interested I can attach the example mission and script Arduino,EOS and Helios Tutorial Static ATC menu mod
ENO Posted December 12, 2013 Posted December 12, 2013 I wouldn't want to take away from the work the Cougar has done but what you've done sounds like it can be applied to any mission at any target? Might also come in handy- but like you (couldn't resist, I'm from canada) mentioned I don't want to hijack this thread either. You should post a thread of your own up- sounds like these two features could work well in their own application. "ENO" Type in anger and you will make the greatest post you will ever regret. "Sweetest's" Military Aviation Art
whartsell Posted December 12, 2013 Posted December 12, 2013 I wouldn't want to take away from the work the Cougar has done but what you've done sounds like it can be applied to any mission at any target? Might also come in handy- but like you (couldn't resist, I'm from canada) mentioned I don't want to hijack this thread either. You should post a thread of your own up- sounds like these two features could work well in their own application. That is correct any target but currently only counts gun hits (of a specific type). I was going to post the script and sample mission this evening when i got home from work but saw your questions so I thought i would chime in Arduino,EOS and Helios Tutorial Static ATC menu mod
Luse Posted December 12, 2013 Posted December 12, 2013 I can see this progressing to a full on mission! Complete with range coms and full ammunition detection. Thank you very much cougar! STT Radar issue is leftover code.
Cougar Posted December 12, 2013 Author Posted December 12, 2013 On the next update ive remove the need for zones ;)....wiyh noodle idea selecting target via f10 menu will make it instead of the complex trigger zone mess... Post it up or pm with your script which mihht help pass on some bumps im having here and there ..
ENO Posted December 12, 2013 Posted December 12, 2013 I take it back then- maybe this is the PERFECT place for similar scripts! "ENO" Type in anger and you will make the greatest post you will ever regret. "Sweetest's" Military Aviation Art
Cougar Posted December 12, 2013 Author Posted December 12, 2013 I take it back then- maybe this is the PERFECT place for similar scripts! Well if it can help better the main script ;) dont feel bad about it
PondLife Posted January 7, 2014 Posted January 7, 2014 Noodle, any chance you can attach your updated scripts, I've been looking for something like this for a while.
gregzagk Posted January 27, 2014 Posted January 27, 2014 Hello! Thanks for the script. I am getting an error when getting in the Huey2 and getting to the Helicopter targets . "ARGO" DCS UH-1H DLC SP Campaign 373vFS DCS World squadron (Greece) - www.buddyspike.net "ARGO 2.0 Project Phoenix" UH-1H DLC Campaign - WIP
Recommended Posts