Jump to content

Recommended Posts

Posted

It should work for any guided A2A or surface to air missile. I didn't change enough for it to break. Which aircraft/weapons are you using and are you sure the script is loading before shots are fired? Just to humor me, put it on a Once>Time Less than 5>Do Script trigger. That is how I had it setup when I tested it earlier.

The right man in the wrong place makes all the difference in the world.

Current Projects:  Grayflag ServerScripting Wiki

Useful Links: Mission Scripting Tools MIST-(GitHub) MIST-(Thread)

 SLMOD, Wiki wishlist, Mission Editing Wiki!, Mission Building Forum

Posted

It's certainly loaded, dcs.log confirms it. Initially tested with an A-10C vs SA-3/SA-6 and loading file a once>time more than 5>do script file trigger.

 

I've switched it to your trigger format and the same occurs, it does however work vs SA-15/SA-8/SA-13 in both cases. So, it appears there may be something related to the missiles themselves (class/type issue perhaps)?13

 

 

Posted

After some investigations I've figured out the problem. Got sidetracked by slmod and general tester stuff so I haven't made the fixes yet. I'm also going to make it a little more configurable so you can easily set it to destroy player missiles or not. Also I forgot I had put this script up on my github as part of my miscScripts repository, so I am going to be editing my older posts in this thread and just link directly to the script file there.

The right man in the wrong place makes all the difference in the world.

Current Projects:  Grayflag ServerScripting Wiki

Useful Links: Mission Scripting Tools MIST-(GitHub) MIST-(Thread)

 SLMOD, Wiki wishlist, Mission Editing Wiki!, Mission Building Forum

Posted

Outstanding. The effort is massively appreciated.

 

Out of curiosity, can you explain what the issue was (in simple terms if possible, preferably with crayons)?

 

 

Posted

I was going to get my wacom tablet out to try and draw it, but it dawned on me that illustrating how code works would probably take to much time to figure out a decent way to do it.

 

The short of it is that I over simplified the code. Specifically it just needs to check the distance to target more often and without much of a delay built in. It was written with sam sites in mind so certain assumptions like estimated time to impact were made and relied upon to define when to check each weapons position. These assumptions made the script not work with shorter range shots, which is something I didn't realize at first. Upon tweaking the numbers for shorter range shots it screwed up longer range shots.

The right man in the wrong place makes all the difference in the world.

Current Projects:  Grayflag ServerScripting Wiki

Useful Links: Mission Scripting Tools MIST-(GitHub) MIST-(Thread)

 SLMOD, Wiki wishlist, Mission Editing Wiki!, Mission Building Forum

Posted

Gotcha, makes sense.

 

Again out of curiosity, and because I keep being asked about it myself when explaining this script to people, is a similar script possible for guns/aaa etc? My instinct is no, but as I only just know enough to tweak parameters in other people's scripts I'm reluctant to say for sure.

 

 

Posted

Grimes, I have nothing valuable to add to the discussion, other than to say that this is the thing I'm most excited for coming to the sim at the moment.

 

Now go make us proud, you coding freak of a man.

[sIGPIC][/sIGPIC]

Posted
Again out of curiosity, and because I keep being asked about it myself when explaining this script to people, is a similar script possible for guns/aaa etc? My instinct is no, but as I only just know enough to tweak parameters in other people's scripts I'm reluctant to say for sure.

 

I'm pretty certain shells can be destroyed, its just a more complex process overall. There are a lot more objects to track and getting those objects isn't as simple as using a lone event handler. Determining a hit would also require a bit more math since its not a single object that explodes once near the target, its dozens-hundreds of objects that have to physically intersect with the target. It can be done, I just don't know how practical it would be. At its simplest it may be possible to do a very rough approximation of the shells trajectory to determine a hit and simply destroy the shells as soon as possible. So you'd have to have ammo for it to work and firing the gun would result in a "simulated" shot.

The right man in the wrong place makes all the difference in the world.

Current Projects:  Grayflag ServerScripting Wiki

Useful Links: Mission Scripting Tools MIST-(GitHub) MIST-(Thread)

 SLMOD, Wiki wishlist, Mission Editing Wiki!, Mission Building Forum

  • 1 month later...
Posted

Grimes, any idea when you'll be able to put some time into this one? I know it's not the most used script and with everything else it'll be way down the to do list, but it would be greatly appreiced by us at least.

 

 

  • 6 months later...
Posted

Grimes.

 

After your recomendation of start learning lua a year a ago.. Now I am in the middle of the process, i did cool scripts to my squadron, and now I want to make something different, but I am not very good at event handlers. So I want to identify Radar Guided missiles, and using this script, "emulate" some electronic warfare, comparing the distance with a specific aricraft/s that will be the Jammers.(Prowlers)

 

So, what I need is,

 

if

missile distance to Prowler unit <= 500m then missile (Radar Guided) has 90% probability of missing ( explode).

elseif

1000m >= missile distance to Prowler unit and >500m then missile (Radar Guided) has 50% probability of missing ( explode).

1500m >= missile distance to Prowler unit and >1000m then missile (Radar Guided) has 25% probability of missing ( explode).

 

I ll check the distances, later.

 

 

What i get with this?? Well, it means that all aircrafts that are close to the Prowler are protected against the missiles. I just want to compare the distance between missile and specific unit.

 

I know I can get the position of the units or objects via getPos etc, but I dont know how to identify them so I an make the script.

 

I have been checking your script but.. I dont know what I should really do.

 

I think if I change...

 

local dist = get3DDist(Object.getPoint(mis.missile), Object.getPoint(mis.origTarg))

for

local dist = get3DDist(Object.getPoint(mis.missile), Object.getPoint(Unit.getByName('Prowler'))

 

What do you think?

 

and then changing the conditions... but I am quite lost here... any advice? or help please??

 

It would be nice to make interdiction missions with F5 or Mirages... depending on flying under the plan to survive and see missiles launched everywere...

Posted

Well when the missile is fired there is the weapon object which you can use Object.getDesc() on to figure out information about it. You'd be looking for a weapon category of missile, a missileCategory of AAM, and missileGuidance of Radar active or radar semi active.

 

I think you are on the right track. Something to know about this little script is that I have it setup to recheck the missile position the closer it is to a target. So if you used your above psuedo code for removing the missiles, then it would be EXTREMELY likely that the missile gets removed. Its written in a way to 100% remove a missile that gets close for training purposes.

  • Like 1

The right man in the wrong place makes all the difference in the world.

Current Projects:  Grayflag ServerScripting Wiki

Useful Links: Mission Scripting Tools MIST-(GitHub) MIST-(Thread)

 SLMOD, Wiki wishlist, Mission Editing Wiki!, Mission Building Forum

Posted

Hi Grimes,

 

this script is so awesome, found it just yet. How's the status on client vs. client (A/A) situations? Does ist work, now?

Hardware: Intel i5 4670K | Zalman NPS9900MAX | GeIL 16GB @1333MHz | Asrock Z97 Pro4 | Sapphire Radeon R9 380X Nitro | Samsung SSDs 840 series 120GB & 250 GB | Samsung HD204UI 2TB | be quiet! Pure Power 530W | Aerocool RS-9 Devil Red | Samsung SyncMaster SA350 24" + ASUS VE198S 19" | Saitek X52 | TrackIR 5 | Thrustmaster MFD Cougar | Speedlink Darksky LED | Razor Diamondback | Razor X-Mat Control | SoundBlaster Tactic 3D Rage ### Software: Windows 10 Pro 64Bit

[sIGPIC][/sIGPIC]

Posted

It didn't work before? There is a little option I added for that: trackAIShotsOnly. It should work, haven't exactly tested it in a while.

https://github.com/mrSkortch/DCS-miscScripts/blob/master/TrainingSams/trainingSams.lua

The right man in the wrong place makes all the difference in the world.

Current Projects:  Grayflag ServerScripting Wiki

Useful Links: Mission Scripting Tools MIST-(GitHub) MIST-(Thread)

 SLMOD, Wiki wishlist, Mission Editing Wiki!, Mission Building Forum

Posted

I am trying to make it work with no success...

 

I just put an A10, with an enemy Tor. I receive the message where says that I should have ejected, but the missile didnt explode, instead it hit me.

 

Can anyone pass me a mission that works?? and if possible the lua file they are using?

 

Cheers.

 

PS: I think, I know how to make the Jammer Script.

Posted

Thanks Grimes, will try it.

 

@Matador: Good to know, I'm looking forward.

Hardware: Intel i5 4670K | Zalman NPS9900MAX | GeIL 16GB @1333MHz | Asrock Z97 Pro4 | Sapphire Radeon R9 380X Nitro | Samsung SSDs 840 series 120GB & 250 GB | Samsung HD204UI 2TB | be quiet! Pure Power 530W | Aerocool RS-9 Devil Red | Samsung SyncMaster SA350 24" + ASUS VE198S 19" | Saitek X52 | TrackIR 5 | Thrustmaster MFD Cougar | Speedlink Darksky LED | Razor Diamondback | Razor X-Mat Control | SoundBlaster Tactic 3D Rage ### Software: Windows 10 Pro 64Bit

[sIGPIC][/sIGPIC]

Posted

Wilco.

Hardware: Intel i5 4670K | Zalman NPS9900MAX | GeIL 16GB @1333MHz | Asrock Z97 Pro4 | Sapphire Radeon R9 380X Nitro | Samsung SSDs 840 series 120GB & 250 GB | Samsung HD204UI 2TB | be quiet! Pure Power 530W | Aerocool RS-9 Devil Red | Samsung SyncMaster SA350 24" + ASUS VE198S 19" | Saitek X52 | TrackIR 5 | Thrustmaster MFD Cougar | Speedlink Darksky LED | Razor Diamondback | Razor X-Mat Control | SoundBlaster Tactic 3D Rage ### Software: Windows 10 Pro 64Bit

[sIGPIC][/sIGPIC]

Posted
Can you post the mission Midnight?? it does not work for me at all.

 

I do not have a mission yet for the Caucasus map and can make one for you, in the meantime you can see it in action on the DCS 2 NTTR VSAAF Training mission. The test area is at Mesquite.

Midnite Signature.jpg

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...