System is Linux SUSE 11.3 and I'm using Oolite 1.75.2
What I want is:
"First mission screen" with "Incoming Message." option
Choosing "Incoming Message." should load "Second mission screen." with "Immediate Launch." option.
but the choice returned is null.
My missiontext.plist looks like:
Code: Select all
{
// Oolite RunnerG5 Mission
"runnerG5_title" = "Oolite Runner Mission";
"runnerG5_Start_1" = "First mission screen.";
"runnerG5_Start_2" = "Second mission screen.";
"runnerG5_End_1" = "Success mission screen.";
"runnerG5_Fail_1" = "Failed mission screen.";
"runnerG5_Start_1_opt" =
{
"MESSAGE" = "Incoming Message.";
};
"runnerG5_Start_2_opt" =
{
"LAUNCH" = "Immediate Launch.";
};
"runnerG5_End_1_opt" =
{
"SUCCESS" = "Success.";
};
"runnerG5_Fail_1_opt" =
{
"FAIL" = "Failed.";
};
}
Code: Select all
this.missionStart = function ()
{
mission.runScreen(
{
titleKey: "runnerG5_title",
messageKey: "runnerG5_Start_1",
choicesKey: "runnerG5_Start_1_opt"
}, runnerG5Callback);
};
this.missionEnd = function()
{
mission.runScreen(
{
titleKey: "runnerG5_title",
messageKey: "runnerG5_End_1",
choicesKey: "runnerG5_End_1_opt"
}, runnerG5Callback);
};
this.missionFail = function()
{
mission.runScreen(
{
titleKey: "runnerG5_title",
messageKey: "runnerG5_Fail_1",
choicesKey: "runnerG5_Fail_1_opt"
}, runnerG5Callback);
};
Code: Select all
this.runnerG5Callback = function (choice)
{
log(this.name+".runnerG5Callback", "called");
log(this.name+".runnerG5Callback.choice", choice);
switch(choice)
{
case "MESSAGE":
mission.runScreen(
{
titleKey: "runnerG5_title",
messageKey: "runnerG5_Start_2",
choicesKey: "runnerG5_Start_2_opt"
}, runnerG5Callback);
break;
case "LAUNCH":
player.ship.launch();
break;
case "SUCCESS":
// Do Success
break;
case "FAIL":
// Do Fail
break;
case null:
player.consoleMessage("NULL AGAIN", 10);
break;
}
};
Thanks