97 lines
2.7 KiB
Plaintext
97 lines
2.7 KiB
Plaintext
/* Script file for Cam1-7S (to start off world map) */
|
|
/* Simply place transporter and show briefing */
|
|
|
|
/* General Values */
|
|
public int player;
|
|
|
|
/* structure limit stuff */
|
|
public STRUCTURESTAT factory, research, oilDerrick, powerGen;
|
|
//public STRUCTURESTAT powerModuleHack;
|
|
public STRUCTURESTAT command, comRelay;
|
|
public INT numPow, numExt, numFac, numRes;
|
|
|
|
/* Briefing stuff */
|
|
public INTMESSAGE MissionBrief, MissionBrief2;
|
|
public INTMESSAGE endMsg; //, winMsg;
|
|
|
|
/* Win or lose */
|
|
public LEVEL NextLev;
|
|
public TEMPLATE transporter;
|
|
public SOUND lostSnd;
|
|
public INT timeLimit;
|
|
|
|
/* Landing Zone coords for Map to follow */
|
|
public INT LZ_X1, LZ_Y1, LZ_X2, LZ_Y2;
|
|
public int exitX, exitY;
|
|
|
|
|
|
/* Triggers: Briefing */
|
|
trigger vidEndTrig(CALL_VIDEO_QUIT);
|
|
trigger gameLostTrig(every, 20);
|
|
|
|
event nextLevEvnt;
|
|
|
|
event start2Evnt(CALL_VIDEO_QUIT)
|
|
{
|
|
//remove first part of two part message, and play second part
|
|
removeMessage(MissionBrief, MISS_MSG, 0);
|
|
setEventTrigger(start2Evnt, inactive);
|
|
addMessage(MissionBrief2, MISS_MSG, 0, true);
|
|
}
|
|
|
|
event startEvnt(CALL_GAMEINIT)
|
|
{
|
|
//set scroll limits
|
|
// setScrollParams(0, 0, 128, 128); //limit scroll
|
|
centreViewPos(1728, 6720); //centre near transport
|
|
addDroid(transporter,1472,6720,player); //place transporter!!!
|
|
setTransporterExit(player, exitX, exitY);
|
|
//set zoom Level 128x128
|
|
setRadarZoom(0);
|
|
//stop player building on LZ
|
|
setLandingZone(10, 51, 12, 53);
|
|
//set Mission time limit
|
|
setMissionTime(timeLimit);
|
|
//allow to build stuff
|
|
setStructureLimits (powerGen,numPow,0);
|
|
setStructureLimits (oilDerrick,numExt,0);
|
|
setStructureLimits (research,numRes,0);
|
|
setStructureLimits (factory,numFac,0);
|
|
setStructureLimits(command, 1, player);
|
|
setStructureLimits(comRelay, 1, player);
|
|
enableStructure(command, player);
|
|
enableStructure(powerGen,0);
|
|
enableStructure(oilDerrick,0);
|
|
enableStructure(research,0);
|
|
enableStructure(factory,0);
|
|
//enableStructure(powerModuleHack, 0);
|
|
//give player briefing
|
|
|
|
//setEventTrigger(nextLevEvnt, vidEndTrig); //flag next stuff after briefing over
|
|
addMessage(MissionBrief, MISS_MSG, 0, true);
|
|
setEventTrigger(startEvnt, inactive);
|
|
}
|
|
|
|
event nextLevEvnt(CALL_START_NEXT_LEVEL)
|
|
{
|
|
//removeMessage(MissionBrief2, MISS_MSG, 0);
|
|
//setLandingZone(LZ_X1, LZ_Y1, LZ_X2, LZ_Y2);
|
|
startMission(OFF_KEEP, NextLev);
|
|
setEventTrigger(nextLevEvnt, inactive);
|
|
}
|
|
|
|
event gameLost(inactive)
|
|
{
|
|
// addMessage(endMsg, MISS_MSG, 0, true);
|
|
// gameOver(false);
|
|
gameOverMessage(endMsg, MISS_MSG, 0, false);
|
|
setEventTrigger(gameLost, inactive);
|
|
}
|
|
|
|
//out of time?
|
|
event lostYetEvnt(CALL_MISSION_TIME)
|
|
{
|
|
setEventTrigger(nextLevEvnt,inactive);
|
|
setEventTrigger(lostYetEvnt, inactive);
|
|
setEventTrigger(gameLost, gameLostTrig); //waits 2 seconds before ending
|
|
} |