The_Dan Posted October 31, 2017 Posted October 31, 2017 (edited) My intention is to spawn enemy groups, nearby a JTAC and then provide the coordinates of the target group via "others" radio menu additionally let the JTAC lase the target, more precise: lase one of the units in the target group to drop a lgb on it. I've read through some threads and be aware that some users here use the designate class for this. I'm looking for an ingame simple solution to this like shown on the TTI server. I'm able to spawn the target unit and the designating JTAC with a script like this: local HQ = GROUP:FindByName( "HQ" ) local CC = COMMANDCENTER:New( HQ, "HQ" ) local GaliSpawnZones = ZONE:New("Gali SpawnZone 01") local SpawnFCP_A = SPAWN:New( "ForwardCommandPost A" ) local SpawnFCP_A_AA = SPAWN:New("AirDefence A"):InitRandomizePosition(true, 90, 100) local SpawnREC_A = SPAWN:New("Recce A"):InitRandomizePosition(true, 600, 620) local FCP01 = SpawnFCP_A:SpawnInZone( GaliSpawnZones, true ) local REC_FCP01 = SpawnREC_A:SpawnFromUnit(FCP01) local FCP01_AA = SpawnFCP_A_AA:SpawnFromUnit(FCP01) local RecceSetGroup = SET_GROUP:New():FilterPrefixes( "Recce" ):FilterStart() local AttackSet = SET_GROUP:New():FilterPrefixes("A-10C"):FilterStart() local RecceDetection = DETECTION_AREAS:New( RecceSetGroup, 1000 ) RecceDetection:Start() local RecceDesignation = DESIGNATE:New( CC, RecceDetection, AttackSet ) RecceDesignation:SetLaserCodes({1688}) RecceDesignation:__Detect(-5) I can get an detection report like in the example missions. But the menu class in MOOSE seems to be rather complicated for my goal. And i have, at this moment, no idea how to implement this with menu class. Additional i would like to know if it is possible to spawn a group (the FCP01 in my example) in random zones with random positioning as in the SpawnInZone command. I would be deebly grateful for any help or some examples (or a direction were to look as i'm a little bit overwhelmed of the MOOSE documentation :huh: ) Edit: if i call the status report in the designation menu i get bulls eye coordinates of the target units, if i change A2A unit system to mgrs, i get the mgrs coordinates. There are no planes except from a blue client A-10C in this mission. Edited October 31, 2017 by The_Dan
FlightControl Posted November 2, 2017 Posted November 2, 2017 My intention is to spawn enemy groups, nearby a JTAC and then provide the coordinates of the target group via "others" radio menu additionally let the JTAC lase the target, more precise: lase one of the units in the target group to drop a lgb on it. I've read through some threads and be aware that some users here use the designate class for this. I'm looking for an ingame simple solution to this like shown on the TTI server. I'm able to spawn the target unit and the designating JTAC with a script like this: local HQ = GROUP:FindByName( "HQ" ) local CC = COMMANDCENTER:New( HQ, "HQ" ) local GaliSpawnZones = ZONE:New("Gali SpawnZone 01") local SpawnFCP_A = SPAWN:New( "ForwardCommandPost A" ) local SpawnFCP_A_AA = SPAWN:New("AirDefence A"):InitRandomizePosition(true, 90, 100) local SpawnREC_A = SPAWN:New("Recce A"):InitRandomizePosition(true, 600, 620) local FCP01 = SpawnFCP_A:SpawnInZone( GaliSpawnZones, true ) local REC_FCP01 = SpawnREC_A:SpawnFromUnit(FCP01) local FCP01_AA = SpawnFCP_A_AA:SpawnFromUnit(FCP01) local RecceSetGroup = SET_GROUP:New():FilterPrefixes( "Recce" ):FilterStart() local AttackSet = SET_GROUP:New():FilterPrefixes("A-10C"):FilterStart() local RecceDetection = DETECTION_AREAS:New( RecceSetGroup, 1000 ) RecceDetection:Start() local RecceDesignation = DESIGNATE:New( CC, RecceDetection, AttackSet ) RecceDesignation:SetLaserCodes({1688}) RecceDesignation:__Detect(-5) I can get an detection report like in the example missions. But the menu class in MOOSE seems to be rather complicated for my goal. And i have, at this moment, no idea how to implement this with menu class. Additional i would like to know if it is possible to spawn a group (the FCP01 in my example) in random zones with random positioning as in the SpawnInZone command. I would be deebly grateful for any help or some examples (or a direction were to look as i'm a little bit overwhelmed of the MOOSE documentation :huh: ) Edit: if i call the status report in the designation menu i get bulls eye coordinates of the target units, if i change A2A unit system to mgrs, i get the mgrs coordinates. There are no planes except from a blue client A-10C in this mission.Can I help? May I ask, what is overwhelming on DESIGNATE? The coding? The functionality? The first impression? Have you used it already? Sent from my SM-N950F using Tapatalk [TABLE][sIGPIC][/sIGPIC]| Join MOOSE community on: DISCORD :thumbup: Website of the MOOSE LUA Framework. MOOSE framework Downloads. Check out Example Missions to try out and learn. MOOSE YouTube Channel for live demonstrations and tutorials. [/TABLE]
The_Dan Posted November 2, 2017 Author Posted November 2, 2017 (edited) As the functionality of MOOSE is very large, the documentations is very complex (this is the nature of such a thing) and that's a bit overwhelming for me at the moment. I have modified this script a bit and it works with a TASK_DISPATCHER now. I get the coordinates like i want and i think the designation works as intendet. One thing that i would like to get working now is the task modelling. I can't post code as i'm at work now, but i give a description and hope to get some hints until i'm home so i can work on the script :D I spawn a "Command Post" group and nearby a Group of Air Defence units. The Task Dispatcher gives me now a SEAD task for the AA-Group. Additionally i want to create a task to destroy the command post. I have seen there is a Detect_Units class in MOOSE, but i'm not able to get it to work. If you have an idea what i'm talking about i would appreciate your help :) My Plan is as follows: Spawn Units (with primary target = command post, AA and JTAC) create Mission. JTAC detects Groups, Task_Dispatcher creates SEAD task for the Mission if he's up for it, BUT force Detection of whole Command Group and get Task_Dispatcher to create a Task to destroy the Primary Target (=Command Group) for the Mission. (Or get into Task modelling and do it without dispatcher if possible, as the Task modelling examples are very short and i don't know how it works for now.) So, i'm now at home. This is the script i'm using now: local HQ = GROUP:FindByName( "HQ" ) local CC = COMMANDCENTER:New( HQ, "HQ" ) local Scoring = SCORING:New( "Scoring" ) local GaliZones = {ZONE:New("Gali SpawnZone 01"), ZONE:New("Gali SpawnZone 02"), ZONE:New("Gali SpawnZone 03"), ZONE:New("Gali SpawnZone 04")} local function SpawnWithAAJTAC(Zones) local SpawnFCP_A = SPAWN:New( "ForwardCommandPost A" ):InitRandomizeZones(Zones):InitRandomizePosition(true, 0, 5000) local SpawnFCP_A_AA = SPAWN:New("AirDefence A"):InitRandomizeUnits(true, 100, 160) local SpawnREC_A = SPAWN:New("JTAC A"):InitRandomizePosition(true, 600, 620) local UNIT = SpawnFCP_A:Spawn() local UNIT_AA = SpawnFCP_A_AA:SpawnFromUnit(UNIT) local REC_UNIT = SpawnREC_A:SpawnFromUnit(UNIT) local AttackSet = SET_GROUP:New():FilterPrefixes("CASClient"):FilterStart() local FACSet = SET_GROUP:New():FilterPrefixes( "JTAC" ):FilterStart() local Mission = MISSION :New( CC, "Destroy Forward Command Post", coalition.side.BLUE ) :AddScoring( Scoring ) local FACAreas = DETECTION_AREAS:New( FACSet, 1000 ) -- i want to add the Forward Command Post Group to the unit set of the detected items -- local TargetSetUnit = SET_UNIT:New() i have no idea wat to write here to get the units from the forward command group added in the unit set to force detection maybe with DETECTION_BASE:AddDetectedItem(ItemPrefix, DetectedItemIndex, Set) or DETECTION_BASE:AddDetectedItemZone(DetectedItemIndex, Set, Zone) again i don't know how it works and then create a task if the dispatcher doesn't do it for me (maybe with TASK_A2G:New(Mission, SetGroup, TaskName, UnitSetTargets, TargetDistance, TargetZone, TargetSetUnit, TaskType, TaskBriefing)) local TaskDispatcher = TASK_A2G_DISPATCHER:New( Mission, AttackSet, FACAreas ) -- This works fine, but does only create an SEAD Task for the AA Group end SpawnWithAAJTAC(GaliZones) --surprisingly this works as intendet :D Edit: After some testing, it does not work as intendet :( Edited November 2, 2017 by The_Dan
Recommended Posts