HammerUK9 Posted August 4, 2012 Posted August 4, 2012 Hi all, I'm looking to do some missions based upon RL A-10 weapons training. At the moment I'm working in DCSW 1.1.1.1, but will be upgrading to DCS:W 1.2 shortly. Take for example the hit criteria for a dive bomb attack - 85ft(26m) for computed delivery and 145ft(44m) for manual delivery. This could be with either live or training ordnance (so BDU-33s are involved). I'm trying to create mission triggers whereby if the weapon lands within the required radius from a central point, a 'success' action starts, likewise a 'failure' action if the weapon misses. Is there any practical way to set this up within DCS? If I try and relate the condition to unit damage, then live ordnance has unwanted fragmentation and training ordnance doesn't count as a hit. Can I find out what weapon fragmentation ranges are? One solution that's occurred to me is to place a ring of units at a radius of hit criteria+fragmentation pattern. Therefore a live weapon impact, if dropped within the required area, would not damage any of the surrounding units, but a miss actually would. Is this feasible? Maybe I'm asking too much from the editor. If it's not possible, then I'll try something else. Thanks for reading!
Eddie Posted August 4, 2012 Posted August 4, 2012 At the moment, it's not possible to detect if a weapon has landed in a certain zone. Hopefully we'll see such a feature in the future. Fragmentation isn't actually modelled, it's sort of approximated by the weapon "hit points" though. It might be technically possible to do what you're considering, but to be honest it'd be that complicated and unreliable I doubt it'd be worth the effort. For the time being at least training weapon drops will have to be scored visually.
Grimes Posted August 4, 2012 Posted August 4, 2012 SLMod v6 http://forums.eagle.ru/showpost.php?p=1514039&postcount=239 "Weapons impacting in zones" is what you seek. The right man in the wrong place makes all the difference in the world. Current Projects: Grayflag Server, Scripting Wiki Useful Links: Mission Scripting Tools MIST-(GitHub) MIST-(Thread) SLMOD, Wiki wishlist, Mission Editing Wiki!, Mission Building Forum
Speed Posted August 4, 2012 Posted August 4, 2012 (edited) Slmod version 6.0 or higher is what you want, if you're willing to put up with these drawbacks: - Slmod requires you to use the multiplayer executable; - You must install Slmod on the server that is hosting the mission (clients do not need to have the mod, Slmod is Server Lua Mod). Slmod does not interfere with your other missions in any way. Like Grimes said, you probably want to use slmod.weapons_impacting_in_zones for something like this. I have yet to release the Slmod guide that includes programming examples for the new functions that I added in Slmod version 6.0 (which includes slmod.weapons_impacting_in_zones, so I can give you a programming example here, it's pretty easy. If you want to go this route, make sure you check out the first post of the Slmod thread here: http://forums.eagle.ru/showthread.php?t=80979 It contains links to both guides (the draft of the full guide and the quick reference guide), installation instructions, links to downloads, basic information, etc. Also take note of the the Slmod example mission here: http://forums.eagle.ru/attachment.php?attachmentid=68569&stc=1&d=1343087314 This example mission uses the slmod.units_firing and slmod.weapons_impacting_in_zone functions. For your example, say that you want to detect whenever the units named "player1" or "player2" drops a Mk-84. You do this by running a Lua function that tells Slmod to set a flag whenever these conditions are met. That Lua function is slmod.units_firing, and you run it with the "DO SCRIPT" trigger action. In this example, say you want flag 1001 to be set, so your Lua function looks like this: slmod.units_firing{ init_units = {'player1', 'player2'}, flag = 1001, weapons = {'Mk-84'}} Now flag 1001 is set true every time the units named "player1" or "player2" drop a Mk-84. Note that many Slmod functions are self-looping (all functions that have a "stopflag" variable are self-looping), meaning that you need only call the Slmod function with the DO SCRIPT trigger action once, and after that, the function will periodically evaluate the condition, and set the flag if the condition is true, looping forever at a certain periodicity (usually once per second) unless you stop it with the optional "stopflag" variable. OK, so now you're detecting when one of these two units named "player1" or "player2" drops a bomb. You might or might not want that in your actual target range mission. I donno. But you definitely need to know if it hits in your mission editor trigger zone: Say you use the mission editor to place a zone named "target". Say you want to set flag 1002 whenever a Mk-84, dropped by either the unit named "player1" or the unit named "player2", impacts inside this zone named "target". This is the script you would use: slmod.weapons_impacting_in_zones {init_units = {'player1', 'player2'}, zones = {'target'}, weapons = {'Mk-84'}, flag = 1002 } With those flags going true on certain conditions, you can now have mission trigger logic that handles those flags and implements your shooting range mission. Edited August 4, 2012 by Speed Intelligent discourse can only begin with the honest admission of your own fallibility. Member of the Virtual Tactical Air Group: http://vtacticalairgroup.com/ Lua scripts and mods: MIssion Scripting Tools (Mist): http://forums.eagle.ru/showthread.php?t=98616 Slmod version 7.0 for DCS: World: http://forums.eagle.ru/showthread.php?t=80979 Now includes remote server administration tools for kicking, banning, loading missions, etc.
Recommended Posts