ScienceExperimentModule¶
The type of structures returned by kOS when querying a module that contains a science experiment.
Some of the science-related tasks are normally not available to kOS scripts. It is for example possible to deploy a science experiment:
SET P TO SHIP:PARTSNAMED("GooExperiment")[1].
SET M TO P:GETMODULE("ModuleScienceExperiment").
M:DOEVENT("observe mystery goo").
Hovewer, this results in a dialog being shown to the user. Only from that dialog it is possible
to reset the experiment or transmit the experiment results back to Kerbin.
ScienceExperimentModule structure introduces a few suffixes that allow the player
to perform all science-related tasks without any manual intervention:
SET P TO SHIP:PARTSNAMED("GooExperiment")[0].
SET M TO P:GETMODULE("ModuleScienceExperiment").
M:DEPLOY.
WAIT UNTIL M:HASDATA.
M:TRANSMIT.
-
structure
ScienceExperimentModule¶ Suffix Type Description All suffixes of PartModuleScienceExperimentModuleobjects are a type ofPartModuleDEPLOY()Deploy and run the science experiment RESET()Reset this experiment if possible TRANSMIT()Transmit the scientific data back to Kerbin DUMP()Discard the data INOPERABLEboolean Is this experiment inoperable RERUNNABLEboolean Can this experiment be run multiple times DEPLOYEDboolean Is this experiment deployed HASDATAboolean Does the experiment have scientific data
Note
A ScienceExperimentModule is a type of PartModule, and therefore can use all the suffixes of PartModule.
-
ScienceExperimentModule:
DEPLOY()¶ Call this method to deploy and run this science experiment. This method will fail if the experiment already contains scientific data or is inoperable.
-
ScienceExperimentModule:
RESET()¶ Call this method to reset this experiment. This method will fail if the experiment is inoperable.
-
ScienceExperimentModule:
TRANSMIT()¶ Call this method to transmit the results of the experiment back to Kerbin. This will render the experiment inoperable if it is not rerunnable. This method will fail if there is no data to send.
-
ScienceExperimentModule:
DUMP()¶ Call this method to discard the data obtained as a result of running this experiment. This will render the experiment inoperable if it is not rerunnable.
-
ScienceExperimentModule:
INOPERABLE¶ Access: Get only Type: boolean True if this experiment is no longer operable.
-
ScienceExperimentModule:
RERUNNABLE¶ Access: Get only Type: boolean True if this experiment can be run multiple times.
-
ScienceExperimentModule:
DEPLOYED¶ Access: Get only Type: boolean True if this experiment is deployed.
-
ScienceExperimentModule:
HASDATA¶ Access: Get only Type: boolean True if this experiment has scientific data stored.