_MOHAPX_ Posted September 18, 2020 Share Posted September 18, 2020 You need telemeter. --add item telemeter to bottom ship --connect telemeter to seat --rename slot in control unit editor to "telemeter" --add to system.update() --Auto extend/retract gear local speed = math.floor(vec3(core.getWorldVelocity()):len() * 3.6) if telemeter.getDistance() < 5 and speed < 10 then if Nav.control.isAnyLandingGearExtended() == 0 then Nav.control.extendLandingGears() end else if Nav.control.isAnyLandingGearExtended() == 1 then Nav.control.retractLandingGears() end end Lasersmith 1 Link to comment Share on other sites More sharing options...
GraXXoR Posted September 18, 2020 Share Posted September 18, 2020 If you’re not worried about underwater landing gear, you don’t even need a telemeter. This can be accomplished just by linking a hover engine to the core and using (iirc) the distance() method. Link to comment Share on other sites More sharing options...
_MOHAPX_ Posted September 18, 2020 Author Share Posted September 18, 2020 2 minutes ago, GraXXoR said: If you’re not worried about underwater landing gear, you don’t even need a telemeter. This can be accomplished just by linking a hover engine to the core and using (iirc) the distance() method. Example pls. Will the distance be calculated to the object below or to the sea level? Link to comment Share on other sites More sharing options...
Doombad Posted October 20, 2020 Share Posted October 20, 2020 On 9/18/2020 at 5:58 AM, _MOHAPX_ said: Example pls. Will the distance be calculated to the object below or to the sea level? When I follow these instructions, I get an error saying null value for Telemeter. I renamed the element. I am sure it has something to do with this but can't figure it out. Link to comment Share on other sites More sharing options...
sHuRuLuNi Posted September 28, 2021 Share Posted September 28, 2021 On 10/20/2020 at 6:51 AM, Doombad said: When I follow these instructions, I get an error saying null value for Telemeter. I renamed the element. I am sure it has something to do with this but can't figure it out. Yeah, a similar script works on another ship of mine - but on the new ship I am building I cannot even link the telemeter to the command seat ("no compatible link type ..."). So, I do not then see the telemeter "slot" - thus I cannot rename it. Was there any change I am not aware of? How am I supposed to link the telemeter now? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now