6a66414638
already been created by the modeler via the <aircraft>-set.xml file. - Varified the code, removed the class structure, tests the nasal dir initialization first. - As part of the Nasal dir, the script must *not* be declared in the <aircraft>-set.xml file.
20 lines
586 B
Text
20 lines
586 B
Text
# Pushback
|
|
# =============================================================================
|
|
# Creates an object to move the pushback to or out of the towing position.
|
|
# Needs /sim/model/pushback to exist in order to be executed.
|
|
|
|
var tractor = nil;
|
|
|
|
var tractor_init = func() {
|
|
var pushback_node = props.globals.getNode("sim/model/pushback");
|
|
if (pushback_node != nil) {
|
|
tractor = aircraft.door.new("sim/model/pushback", 10.0);
|
|
}
|
|
}
|
|
|
|
|
|
var tractor_connect = func() {
|
|
tractor.toggle();
|
|
}
|
|
|
|
_setlistener("/sim/signals/nasal-dir-initialized", func { tractor_init() });
|