ED Team NineLine Posted March 21, 2014 ED Team Posted March 21, 2014 So I have a decent flak script with the help of a number of you a few months back, but I want to make it more better... right now its basically a random explosion in a circle between a range of altitude. What I would prefer is that when an aircraft enters the "guns" range that the position of the explosion is some how random within an area around the aircraft in the zone. Is something like this possible? So basically a target bubble around the aircraft as it travels through a zone, so its still random if the aircraft gets hit, but a better possibility of it. If you need me to past my old code I can, but I am at work, on a Mac and am not sure how it will look pulling it out of a mission I have here :) 1 Forum Rules • My YouTube • My Discord - NineLine#0440• **How to Report a Bug**
Flagrum Posted March 21, 2014 Posted March 21, 2014 So I have a decent flak script with the help of a number of you a few months back, but I want to make it more better... right now its basically a random explosion in a circle between a range of altitude. What I would prefer is that when an aircraft enters the "guns" range that the position of the explosion is some how random within an area around the aircraft in the zone. Is something like this possible? So basically a target bubble around the aircraft as it travels through a zone, so its still random if the aircraft gets hit, but a better possibility of it. If you need me to past my old code I can, but I am at work, on a Mac and am not sure how it will look pulling it out of a mission I have here :) Just add/substract a random value to/of the 3 axis of the targets position? With a range from -r to +r (with r = bubble radius)? But is that really better/more realistic? If I understood you correctly, your current solution is a cylinder with the target in the center. Wouldn't that not be already quite realistic? I mean, in RL it would probably be a flat cone as the origin of the shells would be one point on the ground. Depending of the target's elevation, that cone's sides would be perhaps rather flat angled - i.e. almost disc/cylinder shaped.
ED Team NineLine Posted March 21, 2014 Author ED Team Posted March 21, 2014 (edited) Current solution is a random in a stationary zone, with a random altitude range. I would rather it get the information of the aircraft within the zone, and then trigger an explosion randomly within a bubble around the target. Where the explosions happen are linked to a zone, I want to link them to the aircraft flying within a zone, but unsure how or if I can do that. I want to try to mimic the movement of the gun tracking the target, as well as increase the % chance of a hit. Right now, once you figure out the explosions one happen over or above the altitude range they would become easy to avoid, if that makes sense.... Edited March 21, 2014 by NineLine Forum Rules • My YouTube • My Discord - NineLine#0440• **How to Report a Bug**
Flagrum Posted March 21, 2014 Posted March 21, 2014 Current solution is a random in a stationary zone, with a random altitude range. I would rather it get the information of the aircraft within the zone, and then trigger an explosion randomly within a bubble around the target. Where the explosions happen are linked to a zone, I want to link them to the aircraft flying within a zone, but unsure how or if I can do that. I want to try to mimic the movement of the gun tracking the target, as well as increase the % chance of a hit. Right now, once you figure out the explosions one happen over or above the altitude range they would become easy to avoid, if that makes sense.... Sounds like typical "Sperrfeuer" (barrage? barrage fire?) for areal denial. But I think, I understand what you are looking for. Now the center of that "target area" is a point in the air above a ME zone. But you need the coordinate of the aircraft instead. Sadly, I am not too fluent in LUA script and can not really help you here any further, but I am pretty certain that MIST has functions that return such a coordinate for a unit.
ED Team NineLine Posted March 21, 2014 Author ED Team Posted March 21, 2014 Dont get me wrong, it works pretty decent right now, and I have taken damage from the explosions, but it feels rather low percentage right now from what I think flak should be, as well I would like to see it adjust for different flight paths, otherwise it will be easier to avoid if you were to use it in a MP environment. Another option would just be layering more zones over each other and different elevations but it seems silly to have FLAK going off at 1000 feet when an aircraft is at 8000 feet.... or whatever.... Forum Rules • My YouTube • My Discord - NineLine#0440• **How to Report a Bug**
Bushmanni Posted March 21, 2014 Posted March 21, 2014 Shouldn't the more modern flak gun computer calculate TOF to target and then lead the target and set the fuze timing accordingly ie. the shell will explode somewhere in a cylindrical volume at the lead point after TOF. TOF is a function of lateral range and altitude difference. You could probably build a table with some simulated values and then interpolate between those to get about right TOF. Then you get the position and velocity vector of the target and calculate an estimate for the target position (which is the aimpoint) after TOF. Then you schedule an explosion to happen in a volume which size is dependent of TOF and which is placed at the aimpoint. This way you should have a pretty realistic flak simulation. If you want to simulate proximity fuses then you make the explosions happen at the current altitude of the target at explosion time but still within the aimpoint zone. I'm pretty sure all of this should be possible with SSE. DCS Finland: Suomalainen DCS yhteisö -- Finnish DCS community -------------------------------------------------- SF Squadron
ED Team NineLine Posted March 21, 2014 Author ED Team Posted March 21, 2014 (edited) I am not going for modern though, I am going for WWII era. Although just being a script it could be for modern flak as well.... Edited March 22, 2014 by NineLine Forum Rules • My YouTube • My Discord - NineLine#0440• **How to Report a Bug**
ENO Posted March 22, 2014 Posted March 22, 2014 This may be unrelated- I was trying to get a real feel for one of my missions by creating the quintessential Baghdad night broadcast 1991- tracer fire +++ Unfortunately, "fire at point" is ground level only and so far as I know there is no way to get it going into the air without a target. I ended up having to put a drone up in the sky- invulnerable obviously... and have it circle. I got close, but no real cigar. The only reason I bring it up is that quite often when you're trying to get the sense of flak, a big part of it is the tracer. Or... did they not have that tracer technology this early on? Not being sarcastic... now that I think about it- I'm not sure they had tracers back then. Anyway- it's loosely related to the subject. Any way to add a third dimension to that "fire at point" command? "ENO" Type in anger and you will make the greatest post you will ever regret. "Sweetest's" Military Aviation Art
ED Team NineLine Posted March 22, 2014 Author ED Team Posted March 22, 2014 I have submitted a feature request for that very thing ENO ;) As of right now I dont know a way of getting what you are shooting for, no pun intended, but I agree, systems like the Zu23 should be allowed to fire at a point in the sky. As for tracers, they did have them in WWII, although I dont know about something the size of the 88. Forum Rules • My YouTube • My Discord - NineLine#0440• **How to Report a Bug**
9.JG27 DavidRed Posted March 22, 2014 Posted March 22, 2014 ive seen your vid you posted in the other thread sithspawn....looks really good.cant wait to get my hands on it
WildBillKelsoe Posted March 22, 2014 Posted March 22, 2014 I'd love to try the current script. Link? AWAITING ED NEW DAMAGE MODEL IMPLEMENTATION FOR WW2 BIRDS Fat T is above, thin T is below. Long T is faster, Short T is slower. Open triangle is AWACS, closed triangle is your own sensors. Double dash is friendly, Single dash is enemy. Circle is friendly. Strobe is jammer. Strobe to dash is under 35 km. HDD is 7 times range key. Radar to 160 km, IRST to 10 km. Stay low, but never slow.
ED Team NineLine Posted March 22, 2014 Author ED Team Posted March 22, 2014 I'll upload something tonight, I had a thought I want to try adjusting it :) Forum Rules • My YouTube • My Discord - NineLine#0440• **How to Report a Bug**
WildBillKelsoe Posted March 22, 2014 Posted March 22, 2014 kool. waiting for it AWAITING ED NEW DAMAGE MODEL IMPLEMENTATION FOR WW2 BIRDS Fat T is above, thin T is below. Long T is faster, Short T is slower. Open triangle is AWACS, closed triangle is your own sensors. Double dash is friendly, Single dash is enemy. Circle is friendly. Strobe is jammer. Strobe to dash is under 35 km. HDD is 7 times range key. Radar to 160 km, IRST to 10 km. Stay low, but never slow.
ED Team NineLine Posted March 23, 2014 Author ED Team Posted March 23, 2014 Here is what I have, not much, but I like it....FLAK Script.miz Forum Rules • My YouTube • My Discord - NineLine#0440• **How to Report a Bug**
9.JG27 DavidRed Posted March 23, 2014 Posted March 23, 2014 great will try it out now! thx very much sithspawn!
WildBillKelsoe Posted March 23, 2014 Posted March 23, 2014 will try it later tonight and report back. Cheerios. AWAITING ED NEW DAMAGE MODEL IMPLEMENTATION FOR WW2 BIRDS Fat T is above, thin T is below. Long T is faster, Short T is slower. Open triangle is AWACS, closed triangle is your own sensors. Double dash is friendly, Single dash is enemy. Circle is friendly. Strobe is jammer. Strobe to dash is under 35 km. HDD is 7 times range key. Radar to 160 km, IRST to 10 km. Stay low, but never slow.
RagnarDa Posted March 23, 2014 Posted March 23, 2014 Good work! Do you want me to add this to the list of Lua-scripts? DCS AJS37 HACKERMAN There will always be bugs. If everything is a priority nothing is.
ED Team NineLine Posted March 23, 2014 Author ED Team Posted March 23, 2014 Sure if you like Forum Rules • My YouTube • My Discord - NineLine#0440• **How to Report a Bug**
GGTharos Posted March 23, 2014 Posted March 23, 2014 I'll be trying to make a more realistic version of it ... won't be easy or quick though. [sIGPIC][/sIGPIC] Reminder: SAM = Speed Bump :D I used to play flight sims like you, but then I took a slammer to the knee - Yoda
ED Team NineLine Posted March 23, 2014 Author ED Team Posted March 23, 2014 Thats what I am hoping for, more input, thanks GG Forum Rules • My YouTube • My Discord - NineLine#0440• **How to Report a Bug**
9.JG27 DavidRed Posted March 24, 2014 Posted March 24, 2014 I'll be trying to make a more realistic version of it ... won't be easy or quick though. cool! btw Sithspawn, i tested it and really really like what you came up with already! of course, some tracking of the planes by the flak would be neat, but its already immersive!nice job, very much appreciated!
ED Team NineLine Posted March 24, 2014 Author ED Team Posted March 24, 2014 Yeah, I think I will focus on my actual gun and see what GG and others can do with this script. If it could be made to track aircraft inside a specific zone, that would be a huge boost to this script... and change those damn generic explosions :P Forum Rules • My YouTube • My Discord - NineLine#0440• **How to Report a Bug**
WildBillKelsoe Posted March 25, 2014 Posted March 25, 2014 this is AWESOME!!! keep going! AWAITING ED NEW DAMAGE MODEL IMPLEMENTATION FOR WW2 BIRDS Fat T is above, thin T is below. Long T is faster, Short T is slower. Open triangle is AWACS, closed triangle is your own sensors. Double dash is friendly, Single dash is enemy. Circle is friendly. Strobe is jammer. Strobe to dash is under 35 km. HDD is 7 times range key. Radar to 160 km, IRST to 10 km. Stay low, but never slow.
Stonehouse Posted April 9, 2014 Posted April 9, 2014 (edited) I've been adding this script to a WW2 style mission and wanted to confirm that the accuracy of the barrage is controlled by increasing or decreasing the 8000 number in the line y = land.getHeight(newpoint) + math.random(0, 8000),\\\ or is it simply a random barrage with no controllable accuracy and the explosion happens at a point somewhere between 0 and 8000 m above the ground? I think it is the second one but am too new at lua to be sure. Thanks for any help offered. Cheers, Stonehouse <edit> ok it is the second point, all you can do to make the flak more deadly is either increase the explosion from 500 or have more "flak" zones overlapping so that you get more flak explosions within the main "flakzone" zone. Edited April 11, 2014 by Stonehouse solved
Stonehouse Posted April 16, 2014 Posted April 16, 2014 (edited) I've been trying to approach the flak script a different way and after doing some reading of the Mist manual came up with the script below - which as I am pretty inexperienced - not surprisingly doesn't work. Can anyone give me a bit of a hand and please advise if there are obvious goofs in the code? For instance I haven't got completely comfortable with the vec3 co-ords and would not be surprised if I have my y and z around the wrong way. I'm trying to get the land height at the 2D blue plane position and then subtract the land height from the aircraft height and adjust this result by a random number between -500 and 500 to simulate a plus or minus 500 accuracy. I was also hoping this would happen for each aircraft in the zone. Also I'm running this as a continuous evaluated trigger that fires when any of the blue coalition enters zone "test" and then executes a DO SCRIPT with the lua below as the script. Thanks, Stonehouse do local bluePlanes = mist.makeUnitTable( {'[blue][plane]'} ) local inZoneUnits = mist.getUnitsInZones(bluePlanes, {'test'}) if #inZoneUnits > 0 then for i = 1, #inZoneUnits do local Position_vec3 = inZoneUnits:getPoint() local elevation = land.getHeight{x = Position_vec3.x, y = Position_vec3.z} local vec3 = { x=Position_vec3.x, y=(Position_vec3.z - elevation + math.random(-500,500)), z=Position_vec3.y} trigger.action.explosion(vec3, 500) end end end Edited April 16, 2014 by Stonehouse
Recommended Posts