Jump to content

Simple Range Script


Ciribob

Recommended Posts

@Captain Orso I just took a quick pick at your mission and I do not see anything obviously wrong with it (I'm not able to test it until later tonight). Scripts check, F10 menu is there, groups and unit names seem to match.

 

Couple of things:

1) Just confirming that you are rolling in between 500 and 1500 meters (not feet!) (you probably are but ...)

2) I've never used static objects as the strafing targets, just regular units without waypoint, ROE to weapons hold and disperse under fire disable. (I don't know if this is an issue or not, but that would be my first change)

 

I'll report back once I'm able to actually fly it... I have available the following a/c : AV8B, A10C / A10C2 / F18C, F16C, F5E, C101 and Community A4 (Beta 5.1) ... Let me know if you have any of those so we can reduce a variable (that shouldn't matter anyway).

 

EDIT: I just tested your mission with the A10C II... Works perfectly for me ....When inside the altitude parameters 😉 ... (Outside of the parameters, I don't get the roll in message)... 

 

The strafing zones are really short for the jet thought 😄

 

 


Edited by Draken35
Link to comment
Share on other sites

I Draken, I only just noticed that you updated your last message 😲 - you don't get notified on updates, only on new posts 🙄 . Many thanks for your testing the mission and your reply!

 

I actually did read somewhere that the Max and MinAlt are in meters (should be commented in the script for clarity 😉 ). MinAlt doesn't seem to always make a difference, but generally I set it to 1, because I'm mostly using these missions with warbirds. I believe you can set MinAlt to 0 too, but I didn't want to take the time to test that at this time.

 

Static objects live longer, because... DCS 😕 .... 😄 . I usually use 476 vFG - Air Weapons Range Objects - Downloads - 476th Virtual Fighter Group. I took all the object out to make the mission usable for everyone.

 

Yeah, the mission is setup for warbirds. A longer lead-in for warbirds is not necessary at and leads to the test subject making very long, straight approaches, which are not very good in actual combat.

 

I'm really perplex, why the mission works for you within the Range Script parameters. Are you running it in SP? I'm starting to think that DCS is holding some parameters that break running the mission if you edit, run, edit, run, etc while making adjustments.

When you hit the wrong button on take-off

hwl7xqL.gif

System Specs.

Spoiler
System board: MSI X670E ACE Memory: 64GB DDR5-6000 G.Skill Ripjaw System disk: Crucial P5 M.2 2TB
CPU: AMD Ryzen 7 7800X3D PSU: Corsair HX1200 PSU Monitor: ASUS MG279Q, 27"
CPU cooling: Noctua NH-D15S Graphics card: MSI RTX 3090Ti SuprimX VR: Oculus Rift CV1
 
Link to comment
Share on other sites

4 hours ago, Captain Orso said:

I Draken, I only just noticed that you updated your last message 😲 - you don't get notified on updates, only on new posts 🙄 . Many thanks for your testing the mission and your reply!

 

I actually did read somewhere that the Max and MinAlt are in meters (should be commented in the script for clarity 😉 ). MinAlt doesn't seem to always make a difference, but generally I set it to 1, because I'm mostly using these missions with warbirds. I believe you can set MinAlt to 0 too, but I didn't want to take the time to test that at this time.

 

Static objects live longer, because... DCS 😕 .... 😄 . I usually use 476 vFG - Air Weapons Range Objects - Downloads - 476th Virtual Fighter Group. I took all the object out to make the mission usable for everyone.

 

Yeah, the mission is setup for warbirds. A longer lead-in for warbirds is not necessary at and leads to the test subject making very long, straight approaches, which are not very good in actual combat.

 

I'm really perplex, why the mission works for you within the Range Script parameters. Are you running it in SP? I'm starting to think that DCS is holding some parameters that break running the mission if you edit, run, edit, run, etc while making adjustments.

 

Hi, yes, running in SP.

 

Look at the advance actions on the waypoints... You can make the units immortals and change the to prevent them to fire among other things 🙂 ... 

 

The only times I did not get the roll in message in you mission was when I was outside of the Alt parameters.

 

I haven't discovered the "right" workflow yet but I've noticed that if you do make changes to the script after flying the mission for the first type, DCS do not take those changes even when saving the mission again, so, I got used to go the triggers, select another script, select another trigger, the go back and select the correct script again... Its a pain but it refresh the script 

Link to comment
Share on other sites

I haven't found it necessary to make the targets immortal, yet, but thanks for the tip.

 

I'm not actually using normal vehicles for targets, because I'm using the 476 vFG Rage Object; mostly these two:

Strafing Pit Target, Normandy, Beach, small.jpgNormandy Training Range, small.jpg

 

The strafe pit does get chewed up sometimes, but good luck trying to get enough bombs close enough to the shipping container to do any actual damage to it -- ah ah ah, no lasers, no GBU's -- only using CCIP, or ... warbirds *gasp* 😁

 

When you add a script-file to a mission, the file is read from your disk and it's content is physically added to your mission. If you later change the original script-file, to implement those changes into your mission, you must go to the trigger and re-add the script-file to your mission, to instruct the ME to read the file again. If the ME is not doing this, then it is a major bug and must be reported.

 

Honestly, I've spent so much time on this without any actual perspective of success, I'm going to try this solution out - MOOSE for DCS World - Ranges, and if I'm not forced to do back-flips to get it to work, I'll just move on to this.

When you hit the wrong button on take-off

hwl7xqL.gif

System Specs.

Spoiler
System board: MSI X670E ACE Memory: 64GB DDR5-6000 G.Skill Ripjaw System disk: Crucial P5 M.2 2TB
CPU: AMD Ryzen 7 7800X3D PSU: Corsair HX1200 PSU Monitor: ASUS MG279Q, 27"
CPU cooling: Noctua NH-D15S Graphics card: MSI RTX 3090Ti SuprimX VR: Oculus Rift CV1
 
Link to comment
Share on other sites

I've been testing in SP. I've tried in the dedicated server, but it won't wait for you to join as observer to load the scripts, and then they range script doesn't work.

When you hit the wrong button on take-off

hwl7xqL.gif

System Specs.

Spoiler
System board: MSI X670E ACE Memory: 64GB DDR5-6000 G.Skill Ripjaw System disk: Crucial P5 M.2 2TB
CPU: AMD Ryzen 7 7800X3D PSU: Corsair HX1200 PSU Monitor: ASUS MG279Q, 27"
CPU cooling: Noctua NH-D15S Graphics card: MSI RTX 3090Ti SuprimX VR: Oculus Rift CV1
 
Link to comment
Share on other sites

  • 2 years later...

Two and a half years later and I see that I never reported that I had discovered what the issue that I was having was *sigh*

Management Summery

The Strafe Pit area definition through following the plotted path of a 'Late Activation' vehicle somehow got pulled apart. Per definition the first leg of the path and the last leg must cross, thus forming an enclosed area, which is the Strafe Zone.

In my mission the start of the first and end of the last legs were very close to the crossing. The mission had been modified many, many times and somewhere along the way, for whatever reason the crossing of the first and last legs became uncrossed :doh: No crossing, no enclosed area, no strafe zone definition, no rangescript function. I then made the crossing very distinct, with the first and last legs clearly crossing and the start and endpoints far enough apport that even a Japanese earthquake won't uncross them again.

One simple thing I might suggest would be, instead of this difficult to use vehicle path to create an enclosed area, simply use the now for functional trigger zones. A Quad-point trigger  zone would be perfectly function and easy to create in the ME and easy to reference within the script - easy-peasy.

When you hit the wrong button on take-off

hwl7xqL.gif

System Specs.

Spoiler
System board: MSI X670E ACE Memory: 64GB DDR5-6000 G.Skill Ripjaw System disk: Crucial P5 M.2 2TB
CPU: AMD Ryzen 7 7800X3D PSU: Corsair HX1200 PSU Monitor: ASUS MG279Q, 27"
CPU cooling: Noctua NH-D15S Graphics card: MSI RTX 3090Ti SuprimX VR: Oculus Rift CV1
 
Link to comment
Share on other sites

  • 1 month later...

Dear @Ciribob  

First of all, let me thank you for sharing such a useful script with the DCS community. It has worked fine all these years, but after these last couple of DCS updates something must have changed within DCS that affects the script 😞

I use it on single player, but with two client aircrafts that I can choose from, so they are set as "Client". When I start the mission, I begin as Observer, and after the script loads, I choose one of the aircraft slots.

The script used to refer to me by my MP call name, but today its saying "New callsign", like this:

 

19FLhjH.jpg

 

Not a big deal, but if you have the time maybe can take a look to see if it can be fixed?

Thanks a lot,

 

Eduardo

 

For work: iMac mid-2010 of 27" - Core i7 870 - 6 GB DDR3 1333 MHz - ATI HD5670 - SSD 256 GB - HDD 2 TB - macOS High Sierra

For Gaming: 34" Monitor - Ryzen 3600X - 32 GB DDR4 2400 - nVidia GTX1070ti - SSD 1.25 TB - HDD 10 TB - Win10 Pro - TM HOTAS Cougar - Oculus Rift CV1

Mobile: iPad Pro 12.9" of 256 GB

Link to comment
Share on other sites

On 11/26/2023 at 11:17 AM, Captain Orso said:

Two and a half years later and I see that I never reported that I had discovered what the issue that I was having was *sigh*

Management Summery

The Strafe Pit area definition through following the plotted path of a 'Late Activation' vehicle somehow got pulled apart. Per definition the first leg of the path and the last leg must cross, thus forming an enclosed area, which is the Strafe Zone.

In my mission the start of the first and end of the last legs were very close to the crossing. The mission had been modified many, many times and somewhere along the way, for whatever reason the crossing of the first and last legs became uncrossed :doh: No crossing, no enclosed area, no strafe zone definition, no rangescript function. I then made the crossing very distinct, with the first and last legs clearly crossing and the start and endpoints far enough apport that even a Japanese earthquake won't uncross them again.

One simple thing I might suggest would be, instead of this difficult to use vehicle path to create an enclosed area, simply use the now for functional trigger zones. A Quad-point trigger  zone would be perfectly function and easy to create in the ME and easy to reference within the script - easy-peasy.

WOW... Didn't see this until now... At the end , I  stopped using this script and developed my own. You are a persistent fellow, glad you found your issue!

Link to comment
Share on other sites

32 minutes ago, Draken35 said:

WOW... Didn't see this until now... At the end , I  stopped using this script and developed my own. You are a persistent fellow, glad you found your issue!

LOL yeah, as I said, I found the solution two and a half years ago, but forgot to report it. I though somebody down the line might make use of my experience, for than just general amusement 😁

When you hit the wrong button on take-off

hwl7xqL.gif

System Specs.

Spoiler
System board: MSI X670E ACE Memory: 64GB DDR5-6000 G.Skill Ripjaw System disk: Crucial P5 M.2 2TB
CPU: AMD Ryzen 7 7800X3D PSU: Corsair HX1200 PSU Monitor: ASUS MG279Q, 27"
CPU cooling: Noctua NH-D15S Graphics card: MSI RTX 3090Ti SuprimX VR: Oculus Rift CV1
 
Link to comment
Share on other sites

Dear @Ciribob .. probably you are on a short vacation, but I wanted to report an error that the script sometimes produces, the message is:

 

IOpU9xA.jpg

 

2024-01-06 12:43:50.657 ERROR   SCRIPTING (Main): Mission script error: [string "C:\Users\Eduardo\AppData\Local\Temp\DCS.openbeta\/~mis000022E6.lua"]:417: attempt to concatenate field 'zone' (a table value)
stack traceback:
    [C]: ?
    [string "C:\Users\Eduardo\AppData\Local\Temp\DCS.openbeta\/~mis000022E6.lua"]:417: in function <[string "C:\Users\Eduardo\AppData\Local\Temp\DCS.openbeta\/~mis000022E6.lua"]:390>

 

The script line 417 is this one:

 

local _msg = _unit:getPlayerName()..": left ".._currentStrafeRun.zone.."  too quickly. No Score. "

 

Hopefully you can take a look at it when you have time. If needed, I can send the mission, but it employs a user mod (the 476th VFG Range objects).

Best regards and happy 2024!

 

Eduardo

 

Edit: here is a video of the moments prior to the error:

 

 


Edited by Rudel_chw

 

For work: iMac mid-2010 of 27" - Core i7 870 - 6 GB DDR3 1333 MHz - ATI HD5670 - SSD 256 GB - HDD 2 TB - macOS High Sierra

For Gaming: 34" Monitor - Ryzen 3600X - 32 GB DDR4 2400 - nVidia GTX1070ti - SSD 1.25 TB - HDD 10 TB - Win10 Pro - TM HOTAS Cougar - Oculus Rift CV1

Mobile: iPad Pro 12.9" of 256 GB

Link to comment
Share on other sites

  • Recently Browsing   0 members

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