1
0
Fork 0

if a tutorial is running, let the '+' make the instructor repeat his

last message; otherwise ATC
This commit is contained in:
mfranz 2006-02-24 11:05:13 +00:00
parent 156de8e0c3
commit 783256433a

View file

@ -174,18 +174,28 @@ settimer(func {
############################################################################## ##############################################################################
atc_repeat = func { msg_repeat = func {
var callsign = getprop("/sim/user/callsign"); if (getprop("/sim/tutorial/running")) {
var atc = props.globals.getNode("/sim/messages/atc", 1); var last = getprop("/sim/tutorial/last-message");
var last = atc.getValue(); if (last == nil) {
if (last == nil) { return;
return; }
setprop("/sim/messages/pilot", "Say again ...");
settimer(func { setprop("/sim/messages/copilot", last) }, 1.5);
} else {
var callsign = getprop("/sim/user/callsign");
var atc = props.globals.getNode("/sim/messages/atc", 1);
var last = atc.getValue();
if (last == nil) {
return;
}
setprop("/sim/messages/pilot", "This is " ~ callsign ~ ". Say again, over.");
settimer(func {
atc.setValue("I say again:");
atc.setValue(last)
}, 6);
} }
setprop("/sim/messages/pilot", "This is " ~ callsign ~ ". Say again, over.");
settimer(func {
atc.setValue("I say again:");
atc.setValue(last)
}, 6);
} }