Set up resetting between lessons and death protection, start lesson 2
This commit is contained in:
parent
a29ee99447
commit
8c2836f157
@ -187,6 +187,9 @@
|
||||
// tutorial
|
||||
"oolite-tutorial-no-witchspace" = "Witchspace controls are not available in this simulator.";
|
||||
|
||||
"oolite-tutorial-no-death" = "If this wasn't a simulator, that would have killed you. Be more careful this time!";
|
||||
|
||||
|
||||
"oolite-tutorial-0-0-title" = "Flight Training Course";
|
||||
"oolite-tutorial-0-0-message" = "Welcome to the Cooperative Flight Training Course, pilot. This course will demonstrate the basic functionality of Cooperative ships to you, in a specially-prepared simulator.\n\nThe course is in multiple sections. While in the simulator, you can use the '[oolite_key_activate_equipment]' key to advance to the next entry in the current lesson, and the '[oolite_key_mode_equipment]' key to go to the next lesson, if you wish to skip sections you have previously completed.\n\nOnce the simulation begins, a panel on your screen will display instructions, which you should follow to progress through the course. If you wish to temporarily hide the panel, press the '[oolite_key_cycle_mfd]' key. You can bring it back with the same key, or it will automatically reappear when there are new instructions.\n\nWhen you are ready, press the Enter key to begin the simulation with the first lesson.";
|
||||
"oolite-tutorial-0-0-choices" = { "1" = "Begin Course"; };
|
||||
@ -243,10 +246,24 @@
|
||||
|
||||
"oolite-tutorial-1-24" = "This concludes the introduction to the HUD. There are a few additional HUD indicators which depend either on particular equipment or special circumstances, and these will be described in later lessons.";
|
||||
|
||||
"oolite-tutorial-2-0" = "Lesson 2: Basic navigation\nThis lesson introduces use of the scanner for navigation and identification, and the basic flight controls used in space.\n\nStart by bringing your ship to a complete stop using the '[oolite_key_decrease_speed]' key, then press '[oolite_key_activate_equipment]' to start the lesson.";
|
||||
|
||||
"oolite-tutorial-2-1-error" = "First bring your ship to a complete stop using the '[oolite_key_decrease_speed]' key.";
|
||||
|
||||
"oolite-tutorial-2-1" = "Scanner use: 1/x\nWe have added several asteroids around you, which are unpowered objects and appear on your scanner as a white marker.\nThe circle of the scanner represents the horizontal plane around your ship, with the lines forward approximately indicating your field of view.";
|
||||
|
||||
"oolite-tutorial-2-2" = "Scanner use: 2/x\nThe position of an object above or below the plane is then marked with a stick. The further the object is from the plane, the longer the stick will be.";
|
||||
|
||||
"oolite-tutorial-2-3" = "Scanner use: 3/x\nTo bring an object on the scanner into your forward view, first roll your ship with the '[oolite_key_roll_left]' and '[oolite_key_roll_right]' keys until the object is on the forward/back line of the scanner. Then, use the '[oolite_key_pitch_forward]' and '[oolite_key_pitch_back]' keys to turn your ship so that it is in front of you.";
|
||||
|
||||
"oolite-tutorial-2-4" = "";
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
"oolite-tutorial-end-title" = "Course Complete";
|
||||
"oolite-tutorial-end-message" = "Congratulations on your completion of the Cooperative Pilot's Training Course. We wish you luck in your future career.";
|
||||
"oolite-tutorial-end-message" = "You have now completed the Pilot's Training Course.";
|
||||
"oolite-tutorial-end-choices" = { "1" = "Exit Simulator"; };
|
||||
|
||||
}
|
||||
|
@ -3091,6 +3091,7 @@
|
||||
{
|
||||
is_template = 1;
|
||||
like_ship = "oolite_template_coriolis-station";
|
||||
ai_type = "nullAI.plist";
|
||||
is_carrier = 1;
|
||||
market = "none";
|
||||
name = "Tutorial Station";
|
||||
|
@ -47,6 +47,9 @@ this.startUp = function()
|
||||
// define rest of script now, otherwise it's pointless as it never
|
||||
// gets used in normal play
|
||||
|
||||
this.$tutorialSound = new SoundSource;
|
||||
this.$tutorialSpeech = new SoundSource;
|
||||
|
||||
this.$tutorialStage = 0;
|
||||
this.$tutorialSubstage = 0;
|
||||
|
||||
@ -54,8 +57,10 @@ this.startUp = function()
|
||||
this.$tutorialStages = [
|
||||
3, // stage 0: mission screen, post-launch cleanup, intro message
|
||||
25, // stage 1: HUD displays
|
||||
1 // stage 2: ...
|
||||
]
|
||||
20 // stage 2: scanner and basic flight
|
||||
];
|
||||
|
||||
this.$shipList = [];
|
||||
|
||||
// alternative populator
|
||||
this.ooliteTutorialWillPopulate = function()
|
||||
@ -112,6 +117,18 @@ this.startUp = function()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
this.shipTakingDamage = function(amount, whom, type)
|
||||
{
|
||||
player.ship.position = system.locationFromCode("OUTER_SYSTEM_OFFPLANE");
|
||||
--this.$tutorialStage;
|
||||
this.$tutorialSubstage = 9999;
|
||||
player.ship.dealEnergyDamage(1,10000,0);
|
||||
this._playSound("bigbang.ogg");
|
||||
player.consoleMessage(expandMissionText("oolite-tutorial-no-death"));
|
||||
this._nextItem(); // will call nextSection, which will reset energy
|
||||
}
|
||||
|
||||
|
||||
this.playerStartedJumpCountdown = function()
|
||||
{
|
||||
@ -119,6 +136,13 @@ this.startUp = function()
|
||||
player.consoleMessage(expandMissionText("oolite-tutorial-no-witchspace"));
|
||||
}
|
||||
|
||||
this._playSound = function(snd)
|
||||
{
|
||||
this.$tutorialSound.stop();
|
||||
this.$tutorialSound.sound = snd;
|
||||
this.$tutorialSound.play();
|
||||
}
|
||||
|
||||
// move to the next item in the current tutorial
|
||||
this._nextItem = function()
|
||||
{
|
||||
@ -141,6 +165,7 @@ this.startUp = function()
|
||||
// move to the next section of the tutorial
|
||||
this._nextSection = function()
|
||||
{
|
||||
this._resetPlayerShip();
|
||||
this.$tutorialStage++;
|
||||
this.$tutorialSubstage = 0;
|
||||
var fn = "__stage"+this.$tutorialStage+"sub"+this.$tutorialSubstage;
|
||||
@ -165,6 +190,9 @@ this.startUp = function()
|
||||
{
|
||||
player.ship.setMultiFunctionText("oolite-tutorial",expandMissionText(key),true);
|
||||
player.ship.setMultiFunctionDisplay(0,"oolite-tutorial");
|
||||
this.$tutorialSpeech.stop();
|
||||
this.$tutorialSpeech.sound = key+".ogg";
|
||||
this.$tutorialSpeech.play();
|
||||
}
|
||||
}
|
||||
|
||||
@ -213,6 +241,7 @@ this.startUp = function()
|
||||
|
||||
this._resetHUDItems = function()
|
||||
{
|
||||
this._showHUDItem("");
|
||||
for (var i=0; i<this.$HUDSelectors.length; i++)
|
||||
{
|
||||
player.ship.showHUDSelector(this.$HUDSelectors[i]);
|
||||
@ -227,6 +256,37 @@ this.startUp = function()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
this._resetPlayerShip = function()
|
||||
{
|
||||
player.ship.fuel = 2.0;
|
||||
player.ship.energy = 256;
|
||||
player.ship.forwardShield = 128;
|
||||
player.ship.aftShield = 128;
|
||||
player.ship.forwardWeapon = "EQ_WEAPON_PULSE_LASER";
|
||||
for (var i=0;i<4;i++)
|
||||
{
|
||||
player.ship.removeEquipment("EQ_MISSILE");
|
||||
}
|
||||
for (i=0;i<3;i++)
|
||||
{
|
||||
player.ship.awardEquipment("EQ_MISSILE");
|
||||
}
|
||||
this._resetHUDItems();
|
||||
player.ship.hudHidden = false;
|
||||
for (i=this.$shipList.length-1;i>=0;i--)
|
||||
{
|
||||
this.$shipList[i].remove();
|
||||
}
|
||||
}
|
||||
|
||||
this._addShips = function(role,num,pos,rad)
|
||||
{
|
||||
var arr = system.addShips(role,num,pos,rad);
|
||||
this.$shipList = this.$shipList.concat(arr);
|
||||
return arr;
|
||||
}
|
||||
|
||||
/* Tutorial stages */
|
||||
|
||||
// __stage0sub1 not needed
|
||||
@ -393,12 +453,40 @@ this.startUp = function()
|
||||
this._setInstructions("oolite-tutorial-1-24");
|
||||
}
|
||||
|
||||
|
||||
this.__stage2sub0 = function()
|
||||
{
|
||||
this._resetHUDItems();
|
||||
this._setInstructions("oolite-tutorial-2-0");
|
||||
}
|
||||
|
||||
this.__stage2sub1 = function()
|
||||
{
|
||||
if (player.ship.speed > 0.1)
|
||||
{
|
||||
player.consoleMessage(expandMissionText("oolite-tutorial-2-1-error"));
|
||||
this._setInstructions("oolite-tutorial-2-0");
|
||||
--this.$tutorialSubstage;
|
||||
}
|
||||
else
|
||||
{
|
||||
this._setInstructions("oolite-tutorial-2-1");
|
||||
this._addShips("asteroid",10,player.ship.position,25E3);
|
||||
}
|
||||
}
|
||||
|
||||
this.__stage2sub2 = function()
|
||||
{
|
||||
this._setInstructions("oolite-tutorial-2-2");
|
||||
}
|
||||
|
||||
this.__stage2sub3 = function()
|
||||
{
|
||||
this._setInstructions("oolite-tutorial-2-3");
|
||||
}
|
||||
|
||||
this.__stage2sub4 = function()
|
||||
{
|
||||
this._setInstructions("oolite-tutorial-2-4");
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user