warzone2100/data/script/text/tutorial3.slo

1123 lines
26 KiB
Plaintext

/*
Spanky new improved tutorial script file.
Alex McLean
*/
/* Tutorial Script (Revised version) */
//variables
private INT tutState;
private INT dpMovedCount;
public int initialPowerValue; //initial power level
public TEXTSTRING m_msg1;
public TEXTSTRING m_msg2;
public TEXTSTRING m_msg3;
public TEXTSTRING m_msg4;
public TEXTSTRING m_msg5;
public TEXTSTRING m_msg6;
public TEXTSTRING m_msg7;
public TEXTSTRING m_msg8;
public TEXTSTRING m_msg9;
public TEXTSTRING m_msg10;
public TEXTSTRING m_msg11;
public TEXTSTRING m_msg12;
public TEXTSTRING m_msg13;
public TEXTSTRING m_msg14;
public TEXTSTRING m_msg15;
public TEXTSTRING m_msg16;
public TEXTSTRING m_msg17;
public TEXTSTRING m_msg18;
public TEXTSTRING m_msg19;
public TEXTSTRING m_msg20;
public TEXTSTRING m_msg21;
public TEXTSTRING m_msg22;
public TEXTSTRING m_msg23;
public TEXTSTRING m_msg24;
public TEXTSTRING m_msge1;
public TEXTSTRING m_msge2;
public TEXTSTRING m_msge3;
public TEXTSTRING m_msge4;
public TEXTSTRING m_msge5;
public TEXTSTRING m_msge6;
public TEXTSTRING m_msge7;
public TEXTSTRING m_msge8;
public TEXTSTRING m_msge9;
public TEXTSTRING m_msge10;
public TEXTSTRING m_msge11;
public TEXTSTRING m_msge12;
public TEXTSTRING m_msge13;
public TEXTSTRING m_msge14;
public TEXTSTRING m_msge15;
public TEXTSTRING m_msge16;
public TEXTSTRING m_msge17;
public TEXTSTRING m_msge18;
public TEXTSTRING m_msge19;
public TEXTSTRING factoryRPL;
//components
public SENSOR defaultSensor;
public BODY viperBody;
public BODY howitzerBody;
public BODY missileBody;
public BODY trikeBody;
public BODY buggyBody;
public BODY babaBody;
public CONSTRUCT spade;
public PROPULSION wheeledProp;
public PROPULSION trackProp;
public PROPULSION babaProp;
private DROID selDroid; //selected droid
public STRUCTURESTAT powerGen;
public STRUCTURESTAT oilDerrick;
public STRUCTURE commandCentre;
public STRUCTURE factoryStruc, researchStruc;
public FEATURE res1;
private FEATURE hiddenArtefact;
public FEATURESTAT crate;
public int art1X, art1Y;
public INTMESSAGE art1Msg;
public STRUCTURESTAT research;
public RESEARCHSTAT artefact;
public STRUCTURESTAT factory;
public WEAPON mg;
public SOUND SND_ARTIFACT_DIS;
public SOUND SND_TUT1;
public SOUND SND_TUT2;
public SOUND SND_TUT3;
public SOUND SND_TUT4;
public SOUND SND_TUT5;
public SOUND SND_TUT6;
public SOUND SND_TUT7;
public SOUND SND_TUT8;
public SOUND SND_TUT9;
public SOUND SND_TUT10;
public SOUND SND_TUT11;
public SOUND SND_TUT12;
public SOUND SND_TUT13;
public SOUND SND_TUT14;
public SOUND SND_TUT15;
public SOUND SND_TUT16;
public SOUND SND_TUT17;
public SOUND SND_TUT18;
public SOUND SND_TUT19;
public SOUND SND_TUT20;
public SOUND SND_TUT21;
public SOUND SND_TUT22;
public SOUND SND_TUT23;
public SOUND SND_TUT24;
public SOUND SND_TUT25;
//public SOUND SND_TUT26;
//public SOUND SND_TUT27;
public SOUND SND_TUT28;
public SOUND SND_TUT29;
public SOUND SND_TUT30;
public SOUND SND_TUT31;
public SOUND SND_TUT32;
public SOUND SND_TUT33;
public SOUND SND_TUT34;
public SOUND SND_TUT35;
public SOUND SND_TUT36;
public SOUND SND_TUT37;
public SOUND SND_TUT38;
public SOUND SND_TUT39;
public SOUND SND_TUT40;
public SOUND SND_TUT41;
public SOUND SND_TUT42;
public SOUND SND_TUT43;
public SOUND SND_TUT44;
public SOUND SND_TUT45;
public SOUND SND_TUT46;
public SOUND SND_TUT47;
public SOUND SND_TUT48;
public SOUND SND_TUT49;
public SOUND SND_TUT50;
public SOUND SND_TUT51;
public SOUND SND_TUT52;
public SOUND SND_TUT53;
public SOUND SND_TUT54;
public SOUND SND_TUT55;
public SOUND SND_TUT56;
public SOUND SND_TUT57;
public SOUND SND_TUT58;
public SOUND SND_TUT59;
public SOUND SND_TUT60;
public SOUND SND_TUT61;
public SOUND SND_TUT62;
public SOUND SND_TUT63;
public SOUND SND_TUT64;
public SOUND SND_TUT65;
public SOUND SND_TUT66;
public SOUND SND_TUT67;
public SOUND SND_TUT68;
public SOUND SND_TUT69;
public SOUND SND_TUT70;
public SOUND SND_TUT71;
public SOUND SND_TUT72;
public SOUND SND_TUT73;
public SOUND SND_TUT74;
public SOUND SND_TUT75;
//public SOUND SND_TUT76;
//public SOUND SND_TUT77;
public SOUND SND_TUT78;
//public SOUND SND_TUT79;
//public SOUND SND_TUT80;
public SOUND SND_TUT81;
public SOUND SND_TUT82;
public SOUND SND_TUT83;
public SOUND SND_TUT84;
//proximity messages
public SOUND SND_GEN_ART_HERE;
public SOUND SND_RESO_HERE;
public SOUND SND_DROIDS_REQ;
public SOUND SND_FRIEND_LZ;
public SOUND SND_ENEMY_LZ;
//Design screen buttons
public int NEWDESIGN_BUT, TURRET_BUT, BODY_BUT, PROP_BUT;
public int WEAP_BUT, SYS_BUT, COMM_BUT;
//holder for the researchCompleted callback - can use it if we want, but not really necessary
private RESEARCHSTAT researchDone;
private STRUCTURE structure;
//triggers
trigger droidSelTrig(CALL_DROID_SELECTED, ref selDroid);
trigger droidHelpTrig((selDroid.order==DORDER_HELPBUILD), 5);
trigger droidHelpTrig2((selDroid.order==DORDER_NONE), 5);
trigger tutorialTrigger(every,10);
trigger beingBuilt(structureBeingBuilt(powerGen, 0), 10);
trigger derrickBeingBuilt(structureBeingBuilt(oilDerrick, 0), 10);
trigger inRange(droidInRange(0, hiddenArtefact.x,hiddenArtefact.y, 256), 5);
trigger nextTo(droidInRange(0, hiddenArtefact.x,hiddenArtefact.y, 128), 5);
trigger researchBeingBuilt(structureBeingBuilt(research, 0), 10);
trigger factoryBeingBuilt(structureBeingBuilt(factory, 0), 10);
trigger droidBuilt(CALL_DROIDBUILT);
trigger manurunTrig(CALL_MANURUN);
trigger manulistTrig(CALL_MANULIST);
trigger buildlistTrig(CALL_BUILDLIST);
trigger buildgridTrig(CALL_BUILDGRID);
trigger researchlistTrig(CALL_RESEARCHLIST);
trigger desTrig(CALL_BUTTON_PRESSED, IDRET_DESIGN);
trigger intelTrig(CALL_BUTTON_PRESSED, IDRET_INTELMAP);
trigger newdesTrig(CALL_BUTTON_PRESSED, NEWDESIGN_BUT);
trigger turretTrig2(CALL_DESIGN_WEAPON);
trigger bodyTrig(CALL_BUTTON_PRESSED, BODY_BUT);
trigger bodyTrig2(CALL_DESIGN_BODY);
trigger propTrig2(CALL_DESIGN_PROPULSION);
trigger desQuit(CALL_DESIGN_QUIT);
trigger prodrunTrig(CALL_BUTTON_PRESSED, IDRET_MANUFACTURE);
trigger prodrunTrig2(not(structureIdle(factoryStruc)), 5);
trigger researchartTrig(not(structureIdle(researchStruc)), 5);
trigger designScreenQuitted(CALL_DESIGN_QUIT);
trigger trigDeliv(CALL_DELIVPOINTMOVED);
// Alex's new features
event setupEvent;
event buildDerrick;
event truckSelected;
event derrickBuilt;
event buildIconChosen;
event buildItemChosen;
event tellToHelpBuild;
event otherUnitSelected;
event correctUnit;
event helpedToBuild;
event powerGenBuilt;
event atArtefactSite;
event buildResearchCentre;
event buildIconChosenResearch;
event rfUnderConstruction;
event researchCentreBuilt;
event researchIconSelected;
event artefactChosen;
event researchCompleted;
event designSelected;
event design1;
event design3;
event design4;
event design5;
event design7;
event droidCreated;
event buildIconChosenFactory;
event factoryChosen;
event factoryBuilt;
event manufactureChosen;
event manufactureIconChosen;
event delivPointMoved;
event buildSelectedFactory;
event soundBug;
event firstDroidBuilt;
//event videoDone; // not used.. see end of file
// -------------------------------------------------------------
/* Main entry event - performs setup and the like */
event setupEvent(CALL_GAMEINIT)
{
// ajl: setup templates...
tutorialTemplates();
// Set the flag to say we're in the tutorial - C Variable
inTutorial = TRUE;
// Specify the initial viewing position
centreViewPos(3840,3840);
// Set the initial level of radar zoom
setRadarZoom(1);
// Set up the game level variable
gameLevel = 0;
// Num times delivery point moved
dpMovedCount = 0;
// Remove all the reticule buttons - we don't need them
removeReticuleButton(MANUFACTURE,TRUE);
removeReticuleButton(RESEARCH,TRUE);
removeReticuleButton(INTELMAP,TRUE);
removeReticuleButton(DESIGN,TRUE);
removeReticuleButton(BUILD,TRUE);
removeReticuleButton(OPTIONS,TRUE);
// Set up our initial power level - declared in .slo file
setPowerLevel(initialPowerValue,0);
// Make some components available for later
makeComponentAvailable(viperBody,0);
makeComponentAvailable(spade,0);
makeComponentAvailable(wheeledProp,0);
makeComponentAvailable(mg,0);
// Flag the default sensor
setDefaultSensor(defaultSensor,0);
// Setup the structure limits for all structures
setStructureLimits(factory,1,0);
setStructureLimits(oilDerrick,1,0);
setStructureLimits(powerGen,1,0);
setStructureLimits(research,1,0);
// Fire off track one on the CD if it's there...
playCDAudio(1);
// Fire off next one
setEventTrigger(soundBug,tutorialTrigger);
// And set this event to inactive - switch off
setEventTrigger(setupEvent,inactive);
// Cam3daynight has set to cam 3 so reset to cam 1 - GJ
setCampaignNumber(1);
}
// -------------------------------------------------------------
event soundBug(inactive)
{
// Wait a bit
pause(20);
pause(20);
// needed cos you can't have a pause in CALL_GAMEINIT
playSound(SND_TUT1,0);
addConsoleText(m_msge15,0);
// ... and setup the first real event for action
setEventTrigger(buildDerrick,tutorialTrigger);
setEventTrigger(soundBug,inactive);
}
// -------------------------------------------------------------
// First event-Sets things up for the player to build a derrick
event buildDerrick(inactive)
{
// Setup our state
tutState = 1;
//wait
pause(20);
tagConsoleText(m_msge16,0);
// Playsound "Oil resources are key to your success"
playSound(SND_TUT2,0);
// Allow the player to build derricks
enableStructure(oilDerrick,0);
// PlaySound "To build an oil derrick, select one of your trucks"
playSound(SND_TUT3,0);
pause(40);
tagConsoleText(m_msg1,0);
// Close this event down
setEventTrigger(buildDerrick,inactive);
}
// -------------------------------------------------------------
// What to do when we get the truck selected
event truckSelected(CALL_DROID_SELECTED,ref selDroid)
{
tutState = 2;
// Wait..
pause(10);
addConsoleText(m_msg2,0);
// Playsound "then left click the oil pool indicated by the radar pulse"
playSound(SND_TUT4,0);
// Switch off this event - we don't need it anymore
setEventTrigger(truckSelected,inactive);
}
// -------------------------------------------------------------
// What to do when the resource extractor has been built
event derrickBuilt(CALL_RESEX_BUILT)
{
tutState = 3;
// Wait for a wee bit...
pause(20);
addConsoleText(m_msg3,0);
// PlaySound "The oil derrick is currently dormant"
playSound(SND_TUT5,0);
// PlaySound "To extract the oil and convert it into power
// a power generator is needed"
playSound(SND_TUT6,0);
// wait...
pause(20);
// Allow power generators to be built
enableStructure(powerGen,0);
// PlaySound "Left click the flashing build icon"
playSound(SND_TUT7,0);
pause(40);
tagConsoleText(m_msge1,0);
// We want them to build a power generator now, so add the
// build button
addReticuleButton(BUILD);
// Set it off flashing
flashOn(IDRET_BUILD);
// Close this event
setEventTrigger(derrickBuilt,inactive);
}
// -------------------------------------------------------------
// Fires off when player has clicked on the build icon
event buildIconChosen(buildlistTrig)
{
tutState = 4;
// Stop the build icon flashing...
flashOff(IDRET_BUILD);
// PlaySound "Now left click the power generator in the build menu"
playSound(SND_TUT8,0);
tagConsoleText(m_msge2,0);
setEventTrigger(buildItemChosen,buildgridTrig);
// Close this event
setEventTrigger(buildIconChosen,inactive);
}
// -------------------------------------------------------------
// Fires off when we've clicked on the item in the build menu
event buildItemChosen(inactive)
{
tutState = 5;
addConsoleText(m_msg4,0);
// PlaySound "Position the square at your base then left click
// to start the build process
playSound(SND_TUT9,0);
// Close event
setEventTrigger(buildItemChosen,inactive);
}
// -------------------------------------------------------------
// Fires off when power station is being built
event tellToHelpBuild(beingBuilt)
{
tutState = 6;
addConsoleText(m_msg5,0);
// PlaySound "To increase your build rate, select your second truck"
playSound(SND_TUT10,0);
// Set up other trigger - conflict on droid selection?
setEventTrigger(otherUnitSelected,droidSelTrig);
// get rid of the build button to stop people being silly buggers
removeReticuleButton(BUILD,TRUE);
// Close this event
setEventTrigger(tellToHelpBuild,inactive);
}
// -------------------------------------------------------------
event otherUnitSelected(inactive)
{
tutState = 7;
// Got to be the right unit - not the one already building
setEventTrigger(correctUnit,droidHelpTrig2);
// Close this one
setEventTrigger(otherUnitSelected,inactive);
}
// -------------------------------------------------------------
event correctUnit(inactive)
{
if(tutState==7)
{
tutState = 8;
// PlaySound "Now left click the power generator site
playSound(SND_TUT11,0);
addConsoleText(m_msge18,0);
// Setup the helped-to-build event
setEventTrigger(helpedToBuild,droidHelpTrig);
// And close this one
setEventTrigger(correctUnit,inactive);
}
}
// -------------------------------------------------------------
event helpedToBuild(inactive)
{
if(tutState == 8)
{
tutState = 9;
addConsoleText(m_msge12,0);
// PlaySound "the truck will now help to build the power
// generator"
playSound(SND_TUT12,0);
// Close this event
setEventTrigger(helpedToBuild,inactive);
}
else
{
// default behaviour
clearConsole();
setEventTrigger(helpedToBuild,inactive);
}
}
// -------------------------------------------------------------
// PART TWO - Power Station has been built, by whatever means
// -------------------------------------------------------------
// -------------------------------------------------------------
// Whatever - eventually they'll manage to build a power gen..?!
event powerGenBuilt(CALL_POWERGEN_BUILT)
{
tutState = 10;
clearConsole();
// Wait for a bit
pause(30);
// PlaySound "during missions, you need to ..."
playSound(SND_TUT13,0);
addConsoleText(m_msge19,0);
// Wait a bit
pause(40);
// PlaySound "Use a truck to search..."
playSound(SND_TUT15,0);
// Wait for a bit
pause(20);
tagConsoleText(m_msg6,0);
pause(20);
tagConsoleText(m_msge13,0);
// PlaySound "Move the pointer over the artifact"
playSound(SND_TUT16,0);
// Wait..
pause(30);
// PlaySound "when it turns into a grabber..."
playSound(SND_TUT17,0);
// Add the feature to the map
hiddenArtefact = addFeature(crate,art1X,art1Y);
// Fire off the in range event
setEventTrigger(atArtefactSite,inRange);
// And kill this event
setEventTrigger(powerGenBuilt,inactive);
}
// -------------------------------------------------------------
event atArtefactSite(inactive)
{
tutState = 11;
// Enable the research - premature?
enableResearch(artefact,0);
// Wait for a bit
pause(10);
// fire off the build research centre malarky
setEventTrigger(buildResearchCentre,nextTo);
// Shut this event
setEventTrigger(atArtefactSite,inactive);
}
// -------------------------------------------------------------
event buildResearchCentre(inactive)
{
tutState = 12;
addConsoleText(m_msg7,0);
// Remove the artefact
destroyFeature(hiddenArtefact);
// PlaySound "A research facility is required..."
playSound(SND_TUT18,0);
// Wait..
pause(30);
// PlaySound "Left click the build icon"
playSound(SND_TUT19,0);
tagConsoleText(m_msge1,0);
// Allow them to build research centres
enableStructure(research,0);
// Get the build icon back
addReticuleButton(BUILD);
// flash the icon
flashOn(IDRET_BUILD);
// Activate event
setEventTrigger(buildIconChosenResearch,buildlistTrig);
// close this event
setEventTrigger(buildResearchCentre,inactive);
}
// -------------------------------------------------------------
event buildIconChosenResearch(inactive)
{
tutState = 13;
// Switch off flashing...
flashOff(IDRET_BUILD);
// PlaySound "Now left click thr research facility.."
playSound(SND_TUT20,0);
tagConsoleText(m_msge4,0);
setEventTrigger(buildIconChosenResearch,inactive);
}
// -------------------------------------------------------------
event rfUnderConstruction(researchBeingBuilt)
{
tutState = 14;
clearConsole();
// Wait...
pause(10);
// And get rid of it
removeReticuleButton(BUILD,TRUE);
// PlaySound "Use your other truck to help build..."
playSound(SND_TUT21,0);
// fire off this event second time on different state number - woohoo!
setEventTrigger(helpedToBuild,droidHelpTrig);
addConsoleText(m_msge5,0);
// close event
setEventTrigger(rfUnderConstruction,inactive);
}
// -------------------------------------------------------------
// PART THREE - they've built a research centre!!! Whahey!
// -------------------------------------------------------------
// -------------------------------------------------------------
event researchCentreBuilt(CALL_RESEARCH_BUILT)
{
tutState = 15;
// Get the structure
researchStruc = getStructure(research,0);
// Wait
pause(30);
// PlaySound "to resarch the artefact.."
playSound(SND_TUT22,0);
addConsoleText(m_msge6,0);
// Better add it then
addReticuleButton(RESEARCH);
// Set it flashing
flashOn(RESEARCH);
// Set the event that catches this
setEventTrigger(researchIconSelected,researchlistTrig);
// Kill this event
setEventTrigger(researchCentreBuilt,inactive);
}
// -------------------------------------------------------------
event researchIconSelected(inactive)
{
tutState = 16;
// stop the icon flashing
flashOff(IDRET_RESEARCH);
// PlaySound "Now left click the icon"
playSound(SND_TUT23,0);
tagConsoleText(m_msge7,0);
// Fire up event
setEventTrigger(artefactChosen,researchartTrig);
// Close this one
setEventTrigger(researchIconSelected,inactive);
}
// -------------------------------------------------------------
event artefactChosen(inactive)
{
tutState = 17;
addConsoleText(m_msg8,0);
// PlaySound "the artefact will now be researched"
playSound(SND_TUT24,0);
// Remove the button
removeReticuleButton(RESEARCH,TRUE);
// Close event...
setEventTrigger(artefactChosen,inactive);
}
// -------------------------------------------------------------
event researchCompleted(CALL_RESEARCHCOMPLETED, ref researchDone, ref structure, -1)
{
tutState = 18;
pause(20);
// PlaySound "the researched mg can now be used to .."
playSound(SND_TUT28,0);
addConsoleText(m_msg9,0);
pause(20);
// Remove intel button
removeReticuleButton(INTELMAP,TRUE);
// Add the design button
addReticuleButton(DESIGN);
// Flash Icon
flashOn(IDRET_DESIGN);
// PlaySound "Left click the deisgn icon"
playSound(SND_TUT29,0);
pause(30);
tagConsoleText(m_msge8,0);
// Setup up design event
setEventTrigger(designSelected,desTrig);
// Kill this event..
setEventTrigger(researchCompleted,inactive);
}
// -------------------------------------------------------------
event designSelected(inactive)
{
tutState = 20;
// Switch off flashing
flashOff(IDRET_DESIGN);
addConsoleText(m_msg10,0);
// PlaySound "To start your design"
playSound(SND_TUT30,0);
// Close this one
setEventTrigger(designSelected,inactive);
}
// -------------------------------------------------------------
// they're going to clikc on the vehicle body icon
event design1(newdesTrig)
{
tutState = 21;
clearConsole();
addConsoleText(m_msg11,0);
// PlaySound "Now left click the vehicle body icon"
playSound(SND_TUT31,0);
// Kill this event.
setEventTrigger(design1, inactive);
}
// tell them to click on the body - it's flashing
event design4(bodyTrig)
{
tutState = 22;
addConsoleText(m_msg12,0);
playSound(SND_TUT32,0);
// Kill event
setEventTrigger(design4, inactive);
}
// tell them to select the viper body
event design5(bodyTrig2)
{
tutState = 23;
addConsoleText(m_msg13,0);
// PlaySound "then left click the machine gun to complete design"
playSound(SND_TUT33,0);
setEventTrigger(design5, inactive);
}
event design7(propTrig2)
{
tutState = 27;
// click the machinegun to finalise oyur design
addConsoleText(m_msg16,0);
playSound(SND_TUT34,0);
setEventTrigger(design7, inactive);
}
event design3(turretTrig2)
{
// Your vehicle is named automatically
playSound(SND_TUT35,0);
playSound(SND_TUT36,0);
// Kill event
setEventTrigger(design3, inactive);
}
// -------------------------------------------------------------
// PART FOUR - they've designed their first droid!!!
// -------------------------------------------------------------
// -------------------------------------------------------------
event droidDesigned(CALL_DROIDDESIGNED)
{
tutState = 28;
removeReticuleButton(DESIGN,FALSE);
// wait..
pause(60);
addConsoleText(m_msg17,0);
// 'to finalise your design'
playSound(SND_TUT37,0);
// flash the close button
flashOn(IDRET_CANCEL);
setEventTrigger(droidCreated,designScreenQuitted);
setEventTrigger(droidDesigned,inactive);
}
// -------------------------------------------------------------
event droidCreated(inactive)
{
tutState = 29;
clearConsole();
// Allow 'em to build factories.
enableStructure(factory,0);
// turn off the flashing
flashOff(IDRET_CANCEL);
// Wait for a bit
pause(30);
addConsoleText(m_msg18,0);
// PlaySound "A factory is now required to build..."
playSound(SND_TUT38,0);
// Wait for a bit...
pause(20);
// PlaySound "Left click the build icon"
playSound(SND_TUT39,0);
pause(20);
tagConsoleText(m_msge1,0);
// Add the reticule button
addReticuleButton(BUILD);
// Start it flashing
flashOn(IDRET_BUILD);
// Start next event
setEventTrigger(buildSelectedFactory,buildlistTrig);
// Kill this event
setEventTrigger(droidCreated,inactive);
}
// -------------------------------------------------------------
event buildSelectedFactory(inactive)
{
tutState = 30;
//playSound "Now left click the factory"
playSound(SND_TUT40,0);
tagConsoleText(m_msge9,0);
// Setup next event
setEventTrigger(buildIconChosenFactory,buildgridTrig);
// Kill this event
setEventTrigger(buildSelectedFactory,inactive);
}
// -------------------------------------------------------------
event buildIconChosenFactory(inactive)
{
tutState = 31;
// Stop icon flashing
flashOff(IDRET_BUILD);
// Playsound - now position it at your base
playSound(SND_TUT41,0);
addConsoleText(m_msg19,0);
// kill event
setEventTrigger(buildIconChosenFactory,inactive);
}
// -------------------------------------------------------------
event factoryChosen(factoryBeingBuilt)
{
tutState = 32;
clearConsole();
pause(10);
// Remove build button
removeReticuleButton(BUILD,TRUE);
playSound(SND_TUT42,0);
pause(10);
addConsoleText(m_msg20,0);
pause(20);
playSound(SND_TUT43,0);
tagConsoleText(m_msg21,0);
pause(40);
tagConsoleText(m_msge14,0);
playSound(SND_TUT44,0);
// Kill event
setEventTrigger(factoryChosen,inactive);
}
// -------------------------------------------------------------
event delivPointMoved(trigDeliv)
{
if(dpMovedCount == 0)
{
tutState = 33;
dpMovedCount = 1;
playSound(SND_TUT45,0);
tagConsoleText(m_msge17,0);
}
else
{
if(tutState==33)
{
// if they're getting carried away - just clear the console
clearConsole();
}
}
}
// -------------------------------------------------------------
event factoryBuilt(CALL_FACTORY_BUILT)
{
tutState = 34;
addConsoleText(m_msg22,0);
// get a handle to the built structure
factoryStruc = getStructure(factory,0);
// Wait...
pause(30);
// PlaySound "Manufactre a viper"
playSound(SND_TUT47,0);
// wait..
pause(10);
// Add the manufacture icon
addReticuleButton(MANUFACTURE);
// Setup event trigger
setEventTrigger(manufactureChosen,manulistTrig);
// Flash the manufacture button
flashOn(IDRET_MANUFACTURE);
// PlaySound "Left click the flashing manufacture icon"
playSound(SND_TUT48,0);
tagConsoleText(m_msge10,0);
// Kill this event
setEventTrigger(factoryBuilt,inactive);
}
// -------------------------------------------------------------
event manufactureChosen(inactive)
{
tutState = 35;
// Stop flashing
flashOff(IDRET_MANUFACTURE);
// Play sound "now in te build list..."
playSound(SND_TUT49,0);
playSound(SND_TUT50,0);
tagConsoleText(m_msge11,0);
// Set off next event
setEventTrigger(manufactureIconChosen,prodrunTrig2);
// Kill this one...
setEventTrigger(manufactureChosen,inactive);
}
// -------------------------------------------------------------
event manufactureIconChosen(inactive)
{
tutState = 36;
addConsoleText(m_msg23,0);
// playSoundHere
playSound(SND_TUT52,0);
setEventTrigger(manufactureIconChosen,inactive);
}
// -------------------------------------------------------------
// PART FIVE - They've built their first droid.
// -------------------------------------------------------------
event firstDroidBuilt(droidBuilt)
{
tutState = 37;
// Remove Button
removeReticuleButton(MANUFACTURE,TRUE);
//playVideo(factoryRPL,NULLSTRING); // we don't have cut-scenes, to this would cause the bare sky-box to be shown
//#REGION copied from videoDone(...)
pause(20);
playSound(SND_TUT81,0);
addConsoleText(m_msg24,0);
pause(80);
gameOver(TRUE);
//#END-REGION
setEventTrigger(firstDroidBuilt,inactive);
}
/* not called anymore
// the video is over
event videoDone(CALL_VIDEO_QUIT)
{
pause(20);
playSound(SND_TUT81,0);
addConsoleText(m_msg24,0);
pause(80);
gameOver(TRUE);
setEventTrigger(videoDone,inactive);
}
//*/