Jump to content

Carrier Script Test


Recommended Posts

Carrier script HOTFIX 1.0.1 uploaded.

 

In other news, RE:

Hello, Ineed your help. i dont know whats wrong, but after launching the mission the carrier stops and doesnt turn against the wind. THX

[ATTACH]194924[/ATTACH]

 

 

Got it fixed. It was a combination of a few errors. I also took the liberty of updating it to version 1.0.1 as added to the 1st post.

_1_test.miz


Edited by Wrench
Link to comment
Share on other sites

Hey Wrench, great script.

 

 

I am having some trouble setting it up. I have followed your video exactly (btw it is wrench.wind_set, not wrench_wind_set as in your post), but when I spawn, I have a carrier menu with nothing in it.

 

 

 

I have referred to the sample mission (hotfix.miz) and everything seems to be the same, with the exception I have not setup fighters or AWACS, and there is a script file in that mission wrenchfunctions.lua, which I am assuming for spawning fighters and not important.

 

 

 

 

 

Any idea as to what I am doing wrong?

 

 

Got it working. For whatever reason when I changed it to Wrench.wind_set with a capital W it now works, in case anyone else has this issue.


Edited by patpatpowercat
Link to comment
Share on other sites

Still love the script. However, has anyone else noticed it messes up ICLS with the carrier? Without the script loaded, ICLS works fine. With it, no ICLS. I have also tried loading the ICLS as a triggered action (after the TACAN of course) that is activated after the script loads, and no joy. Any ideas?

 

 

Nevermind, guess it does still work. Sometimes anyways... Maybe has to do with me not intercepting the glidepath. I have noticed however, that the max charlie time is always 30 min, regardless of what I put in the Wrench.wind_set.


Edited by patpatpowercat
I was wrong.
Link to comment
Share on other sites

Disregard.

 

Figured out the problem.


Edited by Yoda967

Very Respectfully,

Kurt "Yoda" Kalbfleisch

London

"In my private manual I firmly believed the only time there was too much fuel aboard any aircraft was if it was fire." --Ernest K. Gann

 

Link to comment
Share on other sites

Thanks for the script!

Any chance to add a plane guard helicopter (spawn on deck when triggered, go into guard position and stay there - starboard side of the ship)?

 

 

https://en.wikipedia.org/wiki/Plane_guard#/media/File:US_Navy_070810-N-2659P-063_An_SH-60F_Seahawk_assigned_to_the_Eightballers_of_Helicopter_Anti-Submarine_Squadron_(HS)_8,_attached_to_Carrier_Air_Wing_(CVW)_9,_hovers_near_the_Nimitz-class_aircraft_carrier_USS_John_C._Stennis.jpg

File:US_Navy_070810-N-2659P-063_An_SH-60F_Seahawk_assigned_to_the_Eightballers_of_Helicopter_Anti-Submarine_Squadron_(HS)_8,_attached_to_Carrier_Air_Wing_(CVW)_9,_hovers_near_the_Nimitz-class_aircraft_carrier_USS_John_C._Stennis.jpg

Regards

REAPER 31 | Painter

[sIGPIC][/sIGPIC]

Link to comment
Share on other sites

Hey Wrench,

 

I'd like to adapt this to the Tarawa for Harrier ops. I thought about it and the offset angle for the CVN needs to be removed. Is the section below the section that deals with setting the heading? Specifically setting the 8

dir = dir + 8 --to account for angle of landing deck and movement of the ship

to 0 should make the boat follow the wind? Thanks.

 

 

if not _G[unit1 .. 'returning'] then

local wind = {}

local windspeed = {}

if _G[unit1] then

local pos1 = _G[unit1]:getPosition().p

local magvar = mist.utils.toDegree(mist.getNorthCorrection(pos1))

if pos1 ~= nil then

pos1.y=pos1.y+1

--get wind info

wind = atmosphere.getWind(pos1)

windspeed = mist.vec.mag(wind)

--get wind direction sorted

local dir = math.atan2(wind.z, wind.x) * 180 / math.pi

if dir < 0 then

dir = dir + 360 --converts to positive numbers

end

if dir <= 180 then

dir = dir + 180

else

dir = dir - 180

end

dir = dir + 8 --to account for angle of landing deck and movement of the ship

if dir > 360 then

dir = dir - 360

end

_G[unit1..'dir'] = math.floor(dir+magvar)

_G[unit1..'heading'] = math.floor(mist.utils.toDegree(mist.getHeading(_G[unit1] , false )))

local dirrad = mist.utils.toRadian(dir)

if windspeed < 12.8611 then

speed = 12.8611 - windspeed

Wrench.go_direction(unit1,dirrad,speed)

else

Wrench.go_direction(unit1,dirrad,1)

end

if not _G[unit1 .. 'override'] then

if _G[unit1 .. 'LARC'] then

Wrench.LARC(unit1)

Wrench.shipshore(unit1)

else

Wrench.ship_from_ip(unit1, distip)

Wrench.shipshore(unit1)

end

end

end

else

trigger.action.outText('unit not detected', 2)

end

--[[

if trigger.misc.getUserFlag(_G[unit1]["id_"]) == 0 then

Wrench.carrier_to_ip(unit1)

end

]]

else

if _G[unit1 .. 'LARC'] then

Wrench.LARC(unit1)

end

end

end

Aurora R7 || i7K 8700K || 2TB 7200RPM SATA 6Gb/s || 2TB M.2 PCIe x4 SSD || GTX 1080 Ti with 11GB GDDR5X || Windows 10 Pro || 32GB Dual Channel DDR4 at 2667MHz || Virpil Warbird Base || Virpil T-50 Stick || Virpil MT-50 Throttle || Thrustmaster TPR Pedals || Oculus Rift

Link to comment
Share on other sites

Yup, you're correct.

I'll have to make a hotfix this week, so I'll add that in as a global variable similar to the tanker orbit parameters as shown in the 1.1 video.

 

Thanks. That's awesome. Good work. I'm testing it now.

Aurora R7 || i7K 8700K || 2TB 7200RPM SATA 6Gb/s || 2TB M.2 PCIe x4 SSD || GTX 1080 Ti with 11GB GDDR5X || Windows 10 Pro || 32GB Dual Channel DDR4 at 2667MHz || Virpil Warbird Base || Virpil T-50 Stick || Virpil MT-50 Throttle || Thrustmaster TPR Pedals || Oculus Rift

Link to comment
Share on other sites

It works. Very nice and neat.

 

So, as kind of a niche` end user I'd say the only thing I could think of for you to add is some sort of test to determine if the unit is a Tarawa or Stennis to set the offset angle for the heading. Reason being is the way I have it I couldn't use the script to control a Tarawa and Stennis at the some time and their headings be correct. Just a thought, not sure it's worth your time though, don't know how many people would use it for both. Though I just thought about it and the rotor heads can use this for their small ships too.

 

 

My last question, since I just thought about that too. Does the tanker script set the tanker waypoints from the ship or the tanker start point? Like, could I set up a C-130 from the shore and it still orbit the Tarawa?

Aurora R7 || i7K 8700K || 2TB 7200RPM SATA 6Gb/s || 2TB M.2 PCIe x4 SSD || GTX 1080 Ti with 11GB GDDR5X || Windows 10 Pro || 32GB Dual Channel DDR4 at 2667MHz || Virpil Warbird Base || Virpil T-50 Stick || Virpil MT-50 Throttle || Thrustmaster TPR Pedals || Oculus Rift

Link to comment
Share on other sites

Like I said, I'll look into the other carriers.

I think I might have the script determine the offset itself. That way, as you say, rotor heads can use it on their destroyers as well.

The tanker script uses the ship's current position and BRC every time it runs (when the tanker finishes an orbit) so the tanker can start anywhere, but it will always fly to and orbit the carrier to which it is assigned. It will also attempt to land on the same when it runs out of fuel, so it might not be a great idea to use on a c-130 :lol:

Link to comment
Share on other sites

Now I have to try. haha

Aurora R7 || i7K 8700K || 2TB 7200RPM SATA 6Gb/s || 2TB M.2 PCIe x4 SSD || GTX 1080 Ti with 11GB GDDR5X || Windows 10 Pro || 32GB Dual Channel DDR4 at 2667MHz || Virpil Warbird Base || Virpil T-50 Stick || Virpil MT-50 Throttle || Thrustmaster TPR Pedals || Oculus Rift

Link to comment
Share on other sites

  • Recently Browsing   0 members

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