Jump to content

Carrier Ops: Recovery Tanker 24/7


funkyfranky

Recommended Posts

  • 2 months later...

hey guys,

is it somehow possible to get the name of the recoverytankergroup after it had spawned into a variable?

or asking other way around, does the variable "tankerStennis" in this example contain the Moose "CONTROLLABLE" group name of the tanker to be used in other scripts (f.e. to declare a SquadronDefaultTanker for the DISPATCHER Class)?

 

tankerStennis=RECOVERYTANKER:New("Stennis", "Texaco")

tankerStennis:SetRadio(261)

tankerStennis:SetTACAN(40, "TEX")

tankerStennis:SetCallsign(CALLSIGN.Tanker.Texaco)

tankerStennis:SetModex(0)

tankerStennis:SetTakeoffAir()

tankerStennis:__Start(1)

Link to comment
Share on other sites

local tankergroup=tankerStennis.tanker
local tankerunit=tankerStennis.tanker:GetUnit(1)

Gives you the MOOSE group and/or unit.

A warrior's mission is to foster the success of others.

i9-12900K | MSI RTX 3080Ti Suprim X | 128 GB Ram 3200 MHz DDR-4 | MSI MPG Edge Z690 | Samung EVO 980 Pro SSD | Virpil Stick, Throttle and Collective | MFG Crosswind | HP Reverb G2

RAT - On the Range - Rescue Helo - Recovery Tanker - Warehouse - Airboss

Link to comment
Share on other sites

local tankergroup=tankerStennis.tanker
local tankerunit=tankerStennis.tanker:GetUnit(1)

Gives you the MOOSE group and/or unit.

 

Hey Franky,

I have another issue which i cant't resolve.

Maybe you have an idea or anybody else?

 

I use Recoverytanker Class for Awacs, and i would like to add the spawned awacs to my EWR Detection-Group Filter for the AI_A2A_DISPATCHER.

I tried to add a prefix to my EWR Detection-Group after having a look at the Alias of the spawned Awacs, which was something like "Stennis_Magic_02#001" ... i tried to add all sort of prefix syntax like "stennis" "stennis_" "stennis_magic" and so on to my EWR Detection-Group Filter but none of them worked. it works with my static radar assets with a prefix name of "BLUE RADAR #xx" but not with the dynamic spawned awacs (could it be the created Alias cannot be defined with a prefix?).

 

If i use f.e. ActualAWACS=awacsStennis:GetAlias() to get the name of the spawned awacs group, it returns a string with the awacs group-name and it's added to the EWR Detection-Group as variable. so far so good, this only works for the first spawned awacs. but what about subsequent spawns? If the awacs respawns (rtb, crash etc.) it gets a new Alias i guess.

 

Is there a way to loop the declaration of the ActualAWACS Variable every 10 min. or so? Would i need to loop the declaration of my EWR Detection-Group too? Do i have a general thinking error regarding this issue?

 

Here's the code snippet:

 

awacsStennis=RECOVERYTANKER:New("Stennis", "Magic")

awacsStennis:SetAWACS()

awacsStennis:SetCallsign(CALLSIGN.AWACS.Magic)

awacsStennis:SetTakeoffAir()

awacsStennis:SetAltitude(20000)

awacsStennis:SetSpeed(300)

awacsStennis:SetRadio(262)

awacsStennis:SetTACAN(1, "MAG")

 

ActualAWACS=awacsStennis:GetAlias()

 

OPFOR_EWRGroupB=SET_GROUP:New()

OPFOR_EWRGroupB:FilterPrefixes({"BLUE RADAR",ActualAWACS})

OPFOR_EWRGroupB:FilterStart()

 

sorry for my bad english


Edited by mono6020
Link to comment
Share on other sites

@mono6020

 

I wouldn't trust that SET_GROUP ( OPFOR_EWRGroupB ) to update.

 

I'd put it in a scheduler and make sure it's global, also, I'd use :FilterOnce() instead of FilterStart()...you might need to put everything in a scheduler, actually.

 

 

Also, how are you spawning them? The spawning code doesn't seem to be included in the snippet (unless I'm missing something).


Edited by Hardcard
Link to comment
Share on other sites

@mono6020

 

I wouldn't trust that SET_GROUP ( OPFOR_EWRGroupB ) to update.

 

I'd put it in a scheduler and make sure it's global, also, I'd use :FilterOnce() instead of FilterStart()...you might need to put everything in a scheduler, actually.

 

 

Also, how are you spawning them? The spawning code doesn't seem to be included in the snippet (unless I'm missing something).

 

Thank you. Makes perfect sense to run everything in a scheduler. do you have a quick hint or link where to learn scheduler scripting? never done that.

Regarding the Spawn: Awacs spawns with RECOVERYTANKER Class.

The Filter for OPFOR_EWRGroupB is used to construct DETECTION_AREAS for the AI_A2A_DISPATCHER. The ultimate Goal would be to have every spawned (and respawned) awacs from the RECOVERYTANKER Class in the DETECTION_AREAS Filter Set automatically.

The Awacs Spawn with RECOVERYTANKER is in my previous post already. If it helps here is my DISPATCHER code snippet (nothing fancy, just an ordinary GCI and CAP Config):

 

OPFOR_EWRGroupB=SET_GROUP:New()

OPFOR_EWRGroupB:FilterPrefixes({"BLUERAD"})

OPFOR_EWRGroupB:FilterStart()

BlueBorder=ZONE_POLYGON:New("UAE Border",GROUP:FindByName("BLUEBRD"))

OPFOR_AirSpaceB=DETECTION_AREAS:New(OPFOR_EWRGroupB,30000)

OPFOR_A2A_DispatcherB=AI_A2A_DISPATCHER:New(OPFOR_AirSpaceB)

OPFOR_A2A_DispatcherB:SetGciRadius(80000)

OPFOR_A2A_DispatcherB:SetEngageRadius(100000)

OPFOR_A2A_DispatcherB:SetDisengageRadius(150000)

OPFOR_A2A_DispatcherB:SetBorderZone(BlueBorder)

OPFOR_A2A_DispatcherB:SetSquadron("OPFOR_Stennis","Stennis","BLUEF18")

OPFOR_A2A_DispatcherB:SetSquadron("OPFOR_Minhad","Al Minhad AB",{"BLUEF16","BLUEM2000"})

OPFOR_A2A_DispatcherB:SetSquadron("OPFOR_Dhafra","Al Dhafra AB",{"BLUEF16","BLUEM2000"})

OPFOR_A2A_DispatcherB:SetSquadron("OPFOR_Liwa","Liwa Airbase",{"BLUEF16","BLUEM2000"})

OPFOR_A2A_DispatcherB:SetSquadronTakeoffInAir("OPFOR_Stennis")

OPFOR_A2A_DispatcherB:SetSquadronTakeoffInAirAltitude("OPFOR_Stennis",8000)

OPFOR_A2A_DispatcherB:SetSquadronTakeoffFromParkingHot("OPFOR_Minhad")

OPFOR_A2A_DispatcherB:SetSquadronTakeoffFromParkingHot("OPFOR_Dhafra")

OPFOR_A2A_DispatcherB:SetSquadronTakeoffFromParkingHot("OPFOR_Liwa")

OPFOR_A2A_DispatcherB:SetDefaultGrouping(2)

OPFOR_A2A_DispatcherB:SetDefaultFuelThreshold(0.2)

OPFOR_A2A_DispatcherB:SetDefaultLandingAtRunway()

OPFOR_A2A_DispatcherB:SetIntercept(450)

OPFOR_A2A_DispatcherB:SetSquadronGci("OPFOR_Minhad",900,1200)

OPFOR_A2A_DispatcherB:SetSquadronGci("OPFOR_Liwa",900,1200)

BLUECAP3=ZONE_POLYGON:New("BLUE CAP3",GROUP:FindByName("BCAP3"))

CARRIERCAP=ZONE_UNIT:New("Carrier CAP",UNIT:FindByName("Stennis"),40000)

BLUECAP1=ZONE_POLYGON:New("BLUE CAP1",GROUP:FindByName("BCAP1"))

BLUECAP2=ZONE_POLYGON:New("BLUE CAP2",GROUP:FindByName("BCAP2"))

OPFOR_A2A_DispatcherB:SetSquadronCap("OPFOR_Stennis",CARRIERCAP,2000,10000,600,800,800,1200,"BARO")

OPFOR_A2A_DispatcherB:SetSquadronCap("OPFOR_Dhafra",BLUECAP1,2000,10000,600,800,800,1200,"BARO")

OPFOR_A2A_DispatcherB:SetSquadronCapInterval("OPFOR_Stennis",1)

OPFOR_A2A_DispatcherB:SetSquadronCapInterval("OPFOR_Dhafra",1)

Link to comment
Share on other sites

  • 4 weeks later...
  • 1 year later...
  • 4 months later...
  • Recently Browsing   0 members

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