Jump to content

crazydunc

Members
  • Posts

    11
  • Joined

  • Last visited

About crazydunc

  • Birthday 10/21/1991

Personal Information

  • Flight Simulators
    737NG FBS, BS2, A10C, F18C, CA, FC3
  • Location
    UK
  • Interests
    Flying, Avionics
  • Occupation
    Engineer

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Morning! For Testing the Fuel flow comparison, I included the temperature effect using a standard rate of change. For SEPC, I don't include the temperature model as it's such a small difference, and there is already a 20% margin in the figured vs the DCS fuel burn. I have spot-checked from DI 30 to DI 120 and found there to be a 12-25% difference throughout. The DI100 figures @Boagord have used above was just the example i had to hand when we were discussing this. Thanks Duncan
  2. Legend - Thank you! Character ID: 2332 (Zen) - Allegiance: RAF Thank you again!
  3. Hi @Ansirial Is there a way we can edit the allegiance of a character? My main character doesn't have one, and I would like to set one if possible! Regards, Dunc
  4. Affirm, still getting the same error set. I wasn't sure if it was because i was using Late activation to spawn. But have tried it without, and setting it to false during the SPAWN: declaration to no avail. Update: The First Iteration of BAI_Test still doesn't work, the jet follows the Waypoints defined in the ME, its almost like the BAI script isnt being actioned, nothing in the log file about it. The Second interation and third seem to work they head to the Patrol Zone and then to the Engage zone. Beyond that they seem to be stuck in the patrol zone again. Update 2 I have increased the Start time to 60s, and added in a Patrol zone hold of 300s and it seems to be working well and reliably. Thank you for the help @Delta99 !!! 2019-01-02 23:49:11.575 INFO SCRIPTING: 10954( 10856)/I: DATABASE00003._RegisterGroupTemplate({[Coalition]=2,[Category]=0,[Group]=BAI_Test#001,[Country]=2,[units]={[1]=BAI_Test#001-01,},}) 2019-01-02 23:49:11.579 INFO SCRIPTING: 81980( 22993)/E: AI_BAI_ZONE01575.ReSpawnFunction(ReSpawn) 2019-01-02 23:49:12.146 INFO SCRIPTING: 82079( -1)/E: AI_BAI_ZONE01575.function(Not in the air, finding route path within PatrolZone) 2019-01-02 23:49:13.834 INFO SCRIPTING: 31( -1)/E: BASE00000.function(Range Mission 1 targets left to be destroyed.) 2019-01-02 23:50:09.385 WARNING LOG: 17 duplicate message(s) skipped. 2019-01-02 23:50:09.385 INFO SCRIPTING: 82094( -1)/E: AI_BAI_ZONE01575.function(In the air, finding route path within PatrolZone) 2019-01-02 23:50:13.723 WARNING LOG: 1 duplicate message(s) skipped. 2019-01-02 23:50:13.723 INFO SCRIPTING: 31( -1)/E: BASE00000.function(Range Mission 1 targets left to be destroyed.) 2019-01-02 23:50:14.024 INFO SCRIPTING: 82094( -1)/E: AI_BAI_ZONE01575.function(In the air, finding route path within PatrolZone) do -- Declare SPAWN objects Spawn_BAITest = SPAWN:New( "BAI_Test" ) Spawn_BAITest:InitKeepUnitNames( true ) Spawn_BAITest:InitLimit( 1, 100 ) Spawn_BAITest:SpawnAtAirbase( AIRBASE:FindByName( AIRBASE.Caucasus.Anapa_Vityazevo ), SPAWN.Takeoff.Hot, 143, 68 ) Spawn_BAITest:InitRepeatOnLanding() Spawn_BAITest:SpawnScheduled(30,0) Spawn_BAITest:InitCleanUp( 20 ) Spawn_BAITest:OnSpawnGroup( function( SpawnGroup ) ---BAI TEST BAIEngagementZone = ZONE:New( "Engagement Zone" ) BAIPlane = SpawnGroup BAI_RANGE_Zone = ZONE:New( "BAI Patrol Zone" ) AIBAIZone = AI_BAI_ZONE:New( BAI_RANGE_Zone, 500, 10000, 500, 600, BAIEngagementZone ) Targets = GROUP:FindByName( "Bomb_Target_AI" ) AIBAIZone:SetControllable( SpawnGroup ) AIBAIZone:__Start( 1 ) AIBAIZone:__Engage( 1 ) Check, CheckScheduleID = SCHEDULER:New(nil, function() if Targets:IsAlive() and Targets:GetSize() ~= 0 then BASE:E( "Range Mission " .. Targets:GetSize() .. " targets left to be destroyed.") else BASE:E( "Range Mission: The Target is destroyed." ) AIBAIZone:__Accomplish( 1 ) end end, {}, 20, 60, 0.4 ) function AIBAIZone:OnAfterAccomplish( Controllable, From, Event, To ) BASE:E( "Range Mission: Sending the bombers back to base." ) Check:Stop( CheckScheduleID ) AIBAIZone:__RTB( 1 ) end end) end
  5. Okay, I am getting there slowly, thank you for the guidance so far. The Aircraft now just sits in the Patrol Zone and doesn't head to the engage zone, until it RTBs with low fuel. 2019-01-02 22:42:52.549 INFO SCRIPTING: 82094( -1)/E: AI_BAI_ZONE02115.function(In the air, finding route path within PatrolZone) 2019-01-02 22:42:53.192 INFO SCRIPTING: 31( -1)/E: BASE00000.function(Range Mission 1 targets left to be destroyed.) I have attached the .Miz in case it's of any use - I am using Moose 2.4.13 Caus_IADS_BAI.miz
  6. Hi Delta99, I changed the code around as you have suggested - it's a much cleaner way of doing it so thank you. I now get the following error: 2019-01-02 22:07:34.609 INFO SCRIPTING: 34581( 23424)/E: AIRBASE00808.FindFreeParkingSpotForAircraft(Anapa-Vityazevo: Looking for 1 parking spot(s) for aircraft of size 15.2 m (x=15.2,y=5.1,z=10.2) at termial type 244.) 2019-01-02 22:07:34.609 INFO SCRIPTING: 34685( 23424)/E: AIRBASE00808.FindFreeParkingSpotForAircraft(Anapa-Vityazevo: Parking spot id 92 free.) 2019-01-02 22:07:34.615 INFO SCRIPTING: 10954( 10856)/I: DATABASE00003._RegisterGroupTemplate({[Coalition]=2,[Category]=0,[Group]=BAI_Test#001,[Country]=2,[units]={[1]=BAI_Test#001-01,},}) 2019-01-02 22:07:34.619 INFO SCRIPTING: 10765( 10867)/I: DATABASE00003.AddGroup({[1]=Add GROUP:,[2]=BAI_Test#001,}) 2019-01-02 22:07:35.560 INFO SCRIPTING: Error in timer function: [string "C:\Users\HAMISH~1\AppData\Local\Temp\DCS\/~mis00000370.lua"]:20939: attempt to index field 'Controllable' (a nil value) 2019-01-02 22:07:35.560 INFO SCRIPTING: stack traceback: [string "C:\Users\HAMISH~1\AppData\Local\Temp\DCS\/~mis00000370.lua"]:5103: in function <[string "C:\Users\HAMISH~1\AppData\Local\Temp\DCS\/~mis00000370.lua"]:5100> [string "C:\Users\HAMISH~1\AppData\Local\Temp\DCS\/~mis00000370.lua"]:20939: in function '_call_handler' [string "C:\Users\HAMISH~1\AppData\Local\Temp\DCS\/~mis00000370.lua"]:20702: in function <[string "C:\Users\HAMISH~1\AppData\Local\Temp\DCS\/~mis00000370.lua"]:20612> (tail call): ? [C]: in function 'xpcall' [string "C:\Users\HAMISH~1\AppData\Local\Temp\DCS\/~mis00000370.lua"]:5138: in function <[string "C:\Users\HAMISH~1\AppData\Local\Temp\DCS\/~mis00000370.lua"]:5097> New Code do -- Declare SPAWN objects Spawn_BAITest = SPAWN:New( "BAI_Test" ) Spawn_BAITest:InitKeepUnitNames( true ) Spawn_BAITest:InitLimit( 1, 100 ) Spawn_BAITest:SpawnAtAirbase( AIRBASE:FindByName( AIRBASE.Caucasus.Anapa_Vityazevo ), SPAWN.Takeoff.Cold ) Spawn_BAITest:InitRepeatOnLanding() Spawn_BAITest:SpawnScheduled(30,0) Spawn_BAITest:InitCleanUp( 20 ) Spawn_BAITest:OnSpawnGroup( function( SpawnGroup ) end) end --BAI TEST BAIEngagementZone = ZONE:New( "Engagement Zone" ) BAIPlane = SpawnGroup BAI_RANGE_Zone = ZONE:New( "BAI Patrol Zone" ) AIBAIZone = AI_BAI_ZONE:New( BAI_RANGE_Zone, 500, 10000, 500, 600, BAIEngagementZone ) Targets = GROUP:FindByName( "Bomb_Target_AI" ) AIBAIZone:SetControllable( BAIPlane ) AIBAIZone:__Start( 1 ) AIBAIZone:__Engage( 1 ) Check, CheckScheduleID = SCHEDULER:New(nil, function() if Targets:IsAlive() and Targets:GetSize() ~= 0 then BASE:E( "Range Mission " .. Targets:GetSize() .. " targets left to be destroyed.") else BASE:E( "Range Mission: The Target is destroyed." ) AIBAIZone:__Accomplish( 1 ) end end, {}, 20, 60, 0.4 ) function AIBAIZone:OnAfterAccomplish( Controllable, From, Event, To ) BASE:E( "Range Mission: Sending the bombers back to base." ) Check:Stop( CheckScheduleID ) AIBAIZone:__RTB( 1 ) end
  7. Hi Delta99, Sorry, I should have been clearer. If I remove the below code and run purely the BAI script, with the BAI_Test Aircraft placed in the ME. The BAI Script works perfectly. When I introduce the Spawn routine below to the code, the aircraft heads to the patrol zone, and then never departs the Patrol Zone for the engage zone. do -- Declare SPAWN objects Spawn_BAITest = SPAWN:New( "BAI_Test" ):InitKeepUnitNames( true ):InitLimit( 1, 100 ):InitCleanUp( 20 ) Spawn_BAITest:SpawnAtAirbase( AIRBASE:FindByName( AIRBASE.Caucasus.Anapa_Vityazevo ), SPAWN.Takeoff.Cold ) Spawn_BAITest:InitRepeatOnLanding() Spawn_BAITest:SpawnScheduled(30,0) end Thanks!
  8. Hi All, Fairly New to Moose, so could use some guidance. I am trying to get a Persistent BAI Mission setup, however, the aircraft goes to the Patrol Zone, and then does not leave for the engagement zone. If I remove the spawn element of the code, then it works fine. So I'm obviously doing something stupid. do -- Declare SPAWN objects Spawn_BAITest = SPAWN:New( "BAI_Test" ):InitKeepUnitNames( true ):InitLimit( 1, 100 ):InitCleanUp( 20 ) ---:InitLateActivated( false ):InitUnControlled( false ) -- Choose repeat functionality Spawn_BAITest:SpawnAtAirbase( AIRBASE:FindByName( AIRBASE.Caucasus.Anapa_Vityazevo ), SPAWN.Takeoff.Cold ) Spawn_BAITest:InitRepeatOnLanding() Spawn_BAITest:SpawnScheduled(30,0) end ---BAI TEST BAIEngagementZone = ZONE:New( "Engagement Zone" ) BAIPlane = GROUP:FindByName( "BAI_Test#001" ) BAI_RANGE_Zone = ZONE:New( "BAI Patrol Zone" ) AIBAIZone = AI_BAI_ZONE:New( BAI_RANGE_Zone, 500, 10000, 500, 600, BAIEngagementZone ) Targets = GROUP:FindByName( "Bomb_Target_AI" ) AIBAIZone:SetControllable( BAIPlane ) AIBAIZone:__Start( 1 ) AIBAIZone:__Engage( 1 ) Check, CheckScheduleID = SCHEDULER:New(nil, function() if Targets:IsAlive() and Targets:GetSize() ~= 0 then BASE:E( "Range Mission " .. Targets:GetSize() .. " targets left to be destroyed.") else BASE:E( "Range Mission: The Target is destroyed." ) AIBAIZone:__Accomplish( 1 ) end end, {}, 20, 60, 0.4 ) function AIBAIZone:OnAfterAccomplish( Controllable, From, Event, To ) BASE:E( "Range Mission: Sending the bombers back to base." ) Check:Stop( CheckScheduleID ) AIBAIZone:__RTB( 1 ) end Within the DCS log, I get the following: 2019-01-02 10:22:38.738 INFO SCRIPTING: 82079( -1)/E: AI_BAI_ZONE01074.function(Not in the air, finding route path within PatrolZone) 2019-01-02 10:22:39.801 INFO SCRIPTING: 152( -1)/E: BASE00000.function(Range Mission 1 targets left to be destroyed.) Any help is appreciated, as I've been stumped by this for the last few days.
  9. Thanks Hippo, I spent a long time playing BS2, the hornet has dragged me back! Nice change from the 737NG FBS I’m usually found in, however I am just trying to avoid the urge to build a Hornet Cockpit now. AFC-327 was a Modification to the F/A-18, some aircraft have it and some don’t, which is why the after statement is there. A process of elimination may be the only real way unfortuantly, they may also cherry pick functionality from different OFPs to suit DCS as well. My 737 has a mixture of 10.3/11/12U FMC functionality, which is both a good and a bad thing. Dunc
  10. Better late than never! :music_whistling:
  11. Hi Hippo, The OFP is the Operational Flight Program for the Mission Computer, basically, the software that sits in the unit, above the base level firmware and does all the MC functions. Best analogy i can come up with is the OFP is essentially the Operating System for the MC. Can't help with the OFP number for the LOT 20 I'm afraid! Dunc
×
×
  • Create New...