X-Plane 12 Lua Script Co Pilot Take-off Guide Gear Up. Baron58_Rotate_Call.lua
In my endeavor to enhance my own X-Plane 12 Lua Scripts are being added to make the flights more enjoyable. Having your own co pilot is great with them reminding you of checks and speeds when flying, takeoff assistance and much more!
This X-Plane 12 Baron58_Rotate_Call.lua script gives you a Gear up – Flaps up and a reminder of your climb speed. It is a short one and can be used in association with the other CO_PILOT scripts here on LetsFlyVFR.
This script can be used in association with the other Baron 58 CO PILOT LUA scripts I believe without any issue. The other Baron 58 scripts end at the point of you taking off! Again use it on its own with any RETRACTABLE wheel aircraft and its likely to work. You can change the CLIMB SPEED to whatever you want if that pleases you!
X-Plane 12: Baron58_Rotate_Call.lua Installation:

Installation:
This file needs to be copied onto a Notepad page then saved as Baron58_RoateCallTest.lua and ensure you change the file type in the lower box from text to ALL FILEs so it will be a LUA script and not a Text File which wont work.
Please copy the saved LUA file into your
X Plane12/Resources/Plugins/FlywithLUA/Scripts folder.
You don’t need to do anything else it will work when you fire up your BARON 58 ONLY OK. It is intended for the Baron 58 only and if you would like other aircraft please let me know below in the comments.
Copy the HTML below and past it into a NOTEPAD page and Save it – Also see attached File to download – WOrdpress does not allow me to upload a LUA SCRIPT so it has to be a text document that you resave as a ALL FILES document then it shows up as a LUA SCRIPT.
What the X-Plane 12 Lua Script Co Pilot Does!
This script is again, designed to be used by many aircraft as well as in parallel with the Baron 58 Copilot scripts being COLD & DARK and the CO PILOT script designed for ENGINES ON start to your flight.
You can start on the RUNWAY – ENGINES RUNNING ready to take off! This script will activate when you release the PARK BRAKE.
1. It will watch until you reach 85 KNots then call “ROTATE” and once you have the aircraft above 100 Knots and the aircraft is in the air you will get a “POSITIVE RATE – GEAR UP” Call.
- Gear Up & Rotate Calls
- Then you get a FLAPS UP Call if required.
- 3. Then you get a reminder of the cruise altitudes for the Baron 58 ie 8000 – 10000 ft.
- 4. Reminder that 120 Knots is the best CLIMB CRUISE Setting Speed.
BONUS LIFE SAVING FEATURE!
5. Built into this Script is a POWER – POWER- POWER Co pilot call should you pass 100 knots then slow below 100 knots and be in danger of STALLING!
This is a safety feature in case you get distracted ir in the cloud get disoriented a little. It triggers when it’s possible you have either climbed to steeply or got distracted grabbing your delicious coffee from the good wife or the kids just came in to ask you for something etc! Regardless it will save your but at some time! I’m Sure! 🙂
No matter its there to cover your butt and could save your Virtual Pilots Life and get you back on the job when you get slow close to the ground!
Finally it reminds you of the suggested Climb speed for the Baron 58 of 120 Knots.
Can I EDIT the LUA SCRIPT? Yeah Fill Your Boots!
Yes, you certainly can adjust the text parts of the LUA so the CO PILOT says different things. This LUA script can be a template for any other aircraft so you can change the BOLD text as you desire.
Note the Beginning and end of the SPEECH line needs to remain as is.
Change the text ” ” and you can use commas ” , ” to put a small pause between spoken lines.
EG: speakNoText(“Rotate, eighty, five, knots“)
You could change this to (“Rotate at Sixty, Five, Knots”) for a Cessna 172 or something else for sure.
You can change the GEAR UP CALL by changing the >100 below but the previous section defines once the aircraft leaves the ground so leave that alone ok.
— Gear up callout at 100 knots and airborne
if not gearup_called and IAS >= 100 and airborne then
speakNoText(“Positive rate, gear up Sir“)
gearup_called = true
end
Change to:
— Gear up callout at 120 knots and airborne
if not gearup_called and IAS >= 120 and airborne then
speakNoText(“Positive rate, gear up Sir“)
gearup_called = true
end
It’s up to you! Oh I take NO RESPONSIBILITY if you change stuff and it stops working OK!
Please keep a WORKING COPY of the LUA script in a LUA SAFE somewhere so you don’t mix them up!
———————————
Save the file as: Baron58_Rotate_Call.lua
———————————
–[[
Baron58_Rotate_Call.lua
Rotate and climb callout system for X-Plane 12
Created by Brendon McALiece of LetsFlyVFR.com
–]]
— Datarefs
dataref(“IAS”, “sim/flightmodel/position/indicated_airspeed”, “readonly”)
dataref(“Y_AGL”, “sim/flightmodel/position/y_agl”, “readonly”)
dataref(“VS”, “sim/flightmodel/position/vh_ind_fpm”, “readonly”) — vertical speed
— Voice function
function speakNoText(sText)
if XPLMSpeakString ~= nil then
XPLMSpeakString(sText)
end
end
— State variables
local rotate_called = false
local gearup_called = false
local power_warning_called = false
local post_gearup_speed_high = false
local climb_check_called = false
local cruise_check_called = false
local debug_called = false — Debug variable
function flightCallouts()
— Simple Debug Output to confirm script execution
if not debug_called then
speakNoText(” “) — This will speak once when the script is loaded.
debug_called = true
end
— Rotate callout strictly at 85 knots
if not rotate_called and IAS >= 85 then
speakNoText(“Rotate, eighty five knots”)
rotate_called = true
end
— Consider “airborne” if vertical speed is positive or slightly off ground
local airborne = Y_AGL > 0.5 or VS > 100
— Gear up callout at 100 knots and airborne
if not gearup_called and IAS >= 100 and airborne then
speakNoText(“Positive rate, gear up”)
gearup_called = true
end
— Mark that speed has reached safe climb speed after gear up
if gearup_called and IAS >= 120 then
post_gearup_speed_high = true
end
— Power warning if speed drops below 105 after being above 120 post-gearup
if gearup_called and post_gearup_speed_high and not power_warning_called and IAS < 105 then
speakNoText(“Power, power, power”)
power_warning_called = true
end
— Climb checklist callout at 110 knots after gear up
if gearup_called and not climb_check_called and IAS >= 110 then
speakNoText(“Flaps up Please, climb speed one zero five knots, Monitor engine instruments. Landing light off above one thousand feet, Cruise climb one hundred and twenty knots please”)
climb_check_called = true
end
— Cruise checklist callout at 160 knots after gear up
if gearup_called and not cruise_check_called and IAS >= 160 then
speakNoText(“Recommended cruise altitude eight to ten thousand feet at your discretion, Brendon”)
cruise_check_called = true
end
end
— Register loop
do_every_frame(“flightCallouts()”)
—————————————
Please Copy everything BELOW and save the text into a NOTEPAD page. Save the File as Baron58_RotateCall and ensure you change the bottom file type box from TEXT to ALL FILES. If you dont you will see a file named like this : Baron58_RotateCall.lua.txt and it wont work!
I did this a couple times causing me some frustration when it WOULD NOT WORK!
Simply RENAME it again and change the TXT to ALL FILES box.

What the Script Does
This script makes callouts as you roll along the runway to take off:

- 85 Knots – Rotate Call
- Posotive Rate – Gear Up
- Flaps Up Reminder If required
- Power Power (Warning if speed drops back to <100 knots}
- Recommend Cruise ALtitude of 8000 – 10000 ft Reminder.
- Climb Speed Call – 120 Knots Best Cruise Climb Speed.
Edit Yourself! Yes You Can!
If there are parts of the spoken sections you would like to edit to suite yourself please feel free to do so. In my variations where it has sir I have my own name. Makes it more personal. Feel free to do this as well.
The example below is where you can change what’s said if you wish. The commas between add a small pause so its not spoken unnaturally.
speakNoText(“Recommended cruise altitude eight to ten thousand feet at your discretion, Sir“)
It could just as easily say as easily:
speakNoText(“Cruise altitude eight to ten thousand feet, Aim for One Twenty Nots Climb Speed all at your discretion, Roger“)
How was it Created?
The scripts is designed by Brendon McAliece (Gunnie) of the LetsFlyVFR.com Blog and LetsFLyVFR.com YouTube Channel for the X Plane 12 community. The script design and flow is assembled by Brendon and using Chat GPT to do the actual programming. This has proven to be immensely frustrating with many many iterations being created and modified just to get to this point.
Honestly the use of CHAT GPT and sometimes other AI, HAS Defiantly NOT made this a five minute task. It’s been three weeks of writing and testing to get to this point at Version 1.0 so if your seeing a later version being delivered then there’s weeks of additional work!
Time has been been dedicated to adjusting, adding new features, tuning features and flight testing the whole X-Plane 12 Baron 58 Copilot Lua Script. Its fun and super frustrating when X Plane sends the script to the QUARANTINE all the time when there is a small issue.
Don’t worry anything that is posted has been thoroughly tested! I hope?
Conclusion
I hope you enjoy the series of X-Plane 12 Lua Scripts I have been creating. THere are more in the works at the moment so if your a Baron 58 Pilot please enjoys these. I hope to add come Cessna 172 and others from the default aircraft list as well so look for those in the Blog Posts Section – Search for LUA scripts and they should come up.
Current Baron 58 Lua Scripts Available.
- COLD START – Baron 58 Co Pilot Lua (Completed & Published)
- Engines Running – Baron 58 Co Pilot Lua (Completed & Published)
- Baron 58 Co Pilot – Take Off – Rotate – Climb (Completed & Published)
- Baron 58 Co Pilot – Cruise Assistance (In Progress)
- Baron 58 Co Pilot – Decent – Landing (In Progress)

Author

Brendon McAliece (Aka Gunnie) is a military veteran with 23 years working on Jet Fighters, their weapons systems and ejection seat/module systems as well as munitions and R&D. Involved with flight simulation since the 1980s, he has flown all the major flight simulators over the years.
He is an Australian expat who has lived in Malaysia, UK, Saudi Arabia and more recently Thailand. He is a multi-lingual blogger who loves to share his life experiences here on LetsFlyVFR.com and DreamingGuitar.com, with his lifestyle and Travel experiences Blog plus his Dreaming Coffee website.
Learn More @
DreamingGuitar.com – DreamingCoffee.com – LetsFlyVFR.com
( HOME – BLOG – SHOP – ABOUT )
This page has been viewed 24 times.
As an Amazon affiliate I may benefit from qualifying sales.
2 responses to “X-Plane 12 Lua Script Co Pilot Take-off Guide Gear Up.”