Orbiter-Forum  

Go Back   Orbiter-Forum > Orbiter Space Flight Simulator > Orbiter SDK
Register Blogs Orbinauts List Social Groups FAQ Projects Mark Forums Read

Orbiter SDK Orbiter software developers post your questions and answers about the SDK, the API interface, LUA, meshing, etc.

Reply
 
Thread Tools
Old 12-19-2016, 09:39 PM   #1
abr35
Orbinaut
Default Changing properties of a vessel with LUA

Might be a very basic question. I'm learning/experimenting with lua. Is it possible to change values for orbiter vessels in lua? Suppose I wanted to remove power from a system (let's call it HUDSystem) and make the HUDSystem.Voltage() equal to 0 with a lua script? Can it be done? How?

Thanks!
abr35 is offline   Reply With Quote
Old 12-21-2016, 02:09 PM   #2
4throck
Enthusiast !
 
4throck's Avatar
Default

Step back a bit.

You can access or set vessel parameters listed on Orbiter's API documentation.
Orbiter simulates the "engine system" and for that yes, you can set fuel to 0. The same goes for radios, for example.

But there's no support for user defined systems, such as your HUDsystem.
You would have to program such a system, and handle it's integration with Orbiter, save and load states from scenarios, etc.

I's not impossible, but depends on what you want to do.


On the previous versions of Orbiter LUA disregarded keyboard events, so it's not really that useful for interaction. Perhaps that bug has been solved, I don't know.

Last edited by 4throck; 12-21-2016 at 02:12 PM.
4throck is offline   Reply With Quote
Old 01-13-2017, 01:36 AM   #3
BEEP
Addon Developer
Default

HI! How is New Jersey snow?

You may check

Code:
function victimize(vctmvi)
.
.
.
end
at the end of any of the loads for Bombsight Script MFD such as Mk_82.cfg


There, in order to turn a vessel into a smoking pit I changed almost every parameter in the vessel. It may not work for all vessels but works for the simple ones ( my Makeshift targets included.)

Rgds

Beep

Last edited by BEEP; 01-13-2017 at 01:38 AM.
BEEP is offline   Reply With Quote
Reply

  Orbiter-Forum > Orbiter Space Flight Simulator > Orbiter SDK


Thread Tools

Posting Rules
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
Forum Jump


All times are GMT. The time now is 06:33 AM.

Quick Links Need Help?


About Us | Rules & Guidelines | TOS Policy | Privacy Policy

Orbiter-Forum is hosted at Orbithangar.com
Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright 2007 - 2017, Orbiter-Forum.com. All rights reserved.