forked from Mirrors/openclonk
Missions storyline expanded to Deep Sea Mining. Added short intro in extra section.
Also adjusted icons, NextMission and MissionAccess in some scenarios and added a split marker between missions within and missions outside the connected storyline.issue1247
parent
31febf7a40
commit
ca582692d4
|
@ -1,5 +1,5 @@
|
|||
[Head]
|
||||
Icon=37
|
||||
Icon=23
|
||||
Title=Crash
|
||||
Version=5,2,90,20
|
||||
Difficulty=30
|
||||
|
|
|
@ -7,6 +7,12 @@
|
|||
|
||||
static g_is_initialized, g_has_bought_plans, npc_pyrit;
|
||||
|
||||
func Initialize()
|
||||
{
|
||||
SetNextMission("Mission.ocf/DeepSeaMining.ocs");
|
||||
return true;
|
||||
}
|
||||
|
||||
func DoInit(int first_player)
|
||||
{
|
||||
CreateObject(Windmill, 152, 825+48, 0);
|
||||
|
|
|
@ -82,7 +82,7 @@ func Intro_4()
|
|||
|
||||
func Intro_5()
|
||||
{
|
||||
MessageBoxAll("$MsgIntro2$", this.hero, true);
|
||||
MessageBoxAll("$MsgIntro2$", GetHero(), true);
|
||||
return ScheduleNext(36);
|
||||
}
|
||||
|
||||
|
@ -136,7 +136,7 @@ func Intro_13()
|
|||
|
||||
func Intro_14()
|
||||
{
|
||||
MessageBoxAll("$MsgIntro4$", this.hero, true);
|
||||
MessageBoxAll("$MsgIntro4$", GetHero(), true);
|
||||
return ScheduleNext(20);
|
||||
}
|
||||
|
||||
|
@ -199,8 +199,8 @@ func Intro_19()
|
|||
|
||||
func Intro_20()
|
||||
{
|
||||
this.hero->SetDir(DIR_Left);
|
||||
MessageBoxAll("$MsgIntro7$", this.hero, true); // what now?
|
||||
GetHero()->SetDir(DIR_Left);
|
||||
MessageBoxAll("$MsgIntro7$", GetHero(), true); // what now?
|
||||
return ScheduleNext(150);
|
||||
}
|
||||
|
||||
|
@ -218,7 +218,7 @@ func Intro_22()
|
|||
|
||||
func Intro_23()
|
||||
{
|
||||
MessageBoxAll("$MsgIntro10$", this.hero, true); // ok
|
||||
MessageBoxAll("$MsgIntro10$", GetHero(), true); // ok
|
||||
return ScheduleNext(40);
|
||||
}
|
||||
|
||||
|
|
|
@ -2,8 +2,9 @@
|
|||
Icon=36
|
||||
Title=DarkCastle
|
||||
Version=5,3,90
|
||||
Difficulty=75
|
||||
Difficulty=45
|
||||
NoInitialize=true
|
||||
MissionAccess=S2Treasure
|
||||
|
||||
[Definitions]
|
||||
Definition1=Objects.ocd
|
||||
|
|
|
@ -137,4 +137,10 @@ func ShroomCaveCheck()
|
|||
Dialogue->MessageBoxAll("$MsgEncounterShrooms$", intruder, true);
|
||||
ClearScheduleCall(nil, Scenario.ShroomCaveCheck);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
func OnGameOver()
|
||||
{
|
||||
GainMissionAccess("S2Castle");
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -13,9 +13,13 @@
|
|||
static main_island_x, main_island_y;
|
||||
static goal_platform_x, goal_platform_y;
|
||||
|
||||
// set after intro to force map creation
|
||||
static g_intro_done;
|
||||
|
||||
// Called be the engine: draw the complete map here.
|
||||
public func InitializeMap(proplist map)
|
||||
{
|
||||
if (!g_intro_done) return true;
|
||||
Resize(300,400);
|
||||
this.sea_y = 50;
|
||||
this.ground_y = 350;
|
||||
|
|
|
@ -2,7 +2,8 @@
|
|||
Title=DeepSeaMining
|
||||
Icon=31
|
||||
Version=5,3,0,0
|
||||
Difficulty=40
|
||||
Difficulty=30
|
||||
MissionAccess=S2Crash
|
||||
|
||||
[Definitions]
|
||||
Definition1=Objects.ocd
|
||||
|
@ -41,7 +42,7 @@ BaseMaterial=Clonk=25;Bread=25;
|
|||
BaseProduction=Clonk=25;Bread=25;
|
||||
|
||||
[Landscape]
|
||||
Sky=Clouds1
|
||||
Sky=Clouds2
|
||||
TopOpen=1
|
||||
BottomOpen=0
|
||||
AutoScanSideOpen=1
|
||||
|
|
|
@ -11,7 +11,9 @@ static goal_platform_x, goal_platform_y;
|
|||
|
||||
static const SCEN_TEST = false;
|
||||
|
||||
protected func Initialize()
|
||||
static g_is_initialized, g_is_in_intro, g_intro_done, npc_tuesday, g_tuesday_pos;
|
||||
|
||||
protected func PostIntroInitialize()
|
||||
{
|
||||
// Construction site on goal platform
|
||||
var goal_site = CreateObject(ConstructionSite, goal_platform_x+10, goal_platform_y+3);
|
||||
|
@ -35,16 +37,38 @@ protected func Initialize()
|
|||
InitVegetation();
|
||||
InitAnimals();
|
||||
InitMainIsland();
|
||||
|
||||
|
||||
// NPC
|
||||
g_tuesday_pos = FindMainIslandPosition(0, 100, true);
|
||||
npc_tuesday = CreateObject(Clonk, g_tuesday_pos[0]+20, g_tuesday_pos[1]-10);
|
||||
npc_tuesday->SetDir(DIR_Left);
|
||||
npc_tuesday->SetColor(0x804000);
|
||||
npc_tuesday->SetName("$Tuesday$");
|
||||
|
||||
SetNextMission("Mission.ocf/TreasureHunt.ocs");
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
func DoInit(int first_player)
|
||||
{
|
||||
StartSequence("Intro", 0, GetCrew(first_player));
|
||||
return true;
|
||||
}
|
||||
|
||||
protected func InitializePlayer(int plr)
|
||||
{
|
||||
// intro has its own initialization
|
||||
if (g_is_in_intro) return true;
|
||||
|
||||
// Harsh zoom range
|
||||
SetPlayerZoomByViewRange(plr, 500, 350, PLRZOOM_LimitMax);
|
||||
SetPlayerZoomByViewRange(plr, 500, 350, PLRZOOM_Direct);
|
||||
SetPlayerViewLock(plr, true);
|
||||
|
||||
// Intro
|
||||
if (!g_is_initialized) g_is_initialized = DoInit(plr);
|
||||
if (!g_intro_done) return true;
|
||||
|
||||
// Position and materials
|
||||
var i, crew;
|
||||
|
@ -69,9 +93,6 @@ protected func InitializePlayer(int plr)
|
|||
|
||||
// Should be done in OnOwnerChanged? It doesn't happen ATM.
|
||||
RedrawAllFlagRadiuses();
|
||||
|
||||
// Goal message for intro
|
||||
Dialogue->MessageBox("$MsgIntro$", GetCursor(plr), GetCrew(plr), plr, true); // oh no we're stranded!
|
||||
|
||||
return;
|
||||
}
|
||||
|
@ -240,7 +261,7 @@ private func FindMainIslandPosition(int xpos, int sep, bool no_struct)
|
|||
|
||||
if (GetMaterial(x,y) == Material("Brick")) continue; // not on goal platform
|
||||
|
||||
if (!no_struct || !FindObject(Find_Or(Find_Category(C4D_Structure), Find_Func("IsFlagpole")), Find_Distance(60, x, y)))
|
||||
if (!no_struct || !FindObject(Find_Or(Find_Category(C4D_Structure), Find_Func("IsFlagpole"), Find_ID(WindGenerator)), Find_Distance(60, x, y)))
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -253,116 +274,22 @@ private func FindMainIslandPosition(int xpos, int sep, bool no_struct)
|
|||
// Goal fulfilled
|
||||
public func OnGoalsFulfilled()
|
||||
{
|
||||
var outro = {};
|
||||
outro.communicator = FindObject(Find_Func("IsCrystalCommunicator"));
|
||||
if (!outro.communicator) return false; // what?
|
||||
// Stop Clonks and disable player controls
|
||||
Dialogue->StartCinematics(outro.communicator);
|
||||
// Outro
|
||||
ScheduleCall(nil, this.Fade2Darkness, 15, 32, {});
|
||||
Dialogue->MessageBoxAll("$MsgOutro1$", GetOutroTalker(outro), true); // ok turn it on
|
||||
ScheduleCall(nil, Scenario.Outro0, 100, 1, outro);
|
||||
GainMissionAccess("S2Sea");
|
||||
StartSequence("Outro", 0);
|
||||
// Return true to force goal rule to not call GameOver() yet
|
||||
return true;
|
||||
}
|
||||
|
||||
private func Outro0(proplist outro)
|
||||
{
|
||||
outro.communicator->StartCommunication(); // 250 frames
|
||||
ScheduleCall(nil, Scenario.Outro1, 650, 1, outro);
|
||||
}
|
||||
|
||||
private func Outro1(proplist outro)
|
||||
{
|
||||
Dialogue->MessageBoxAll("$MsgOutro2$", GetOutroTalker(outro), true); // let's see if it works
|
||||
ScheduleCall(nil, Scenario.Outro2, 50, 1, outro);
|
||||
}
|
||||
// Intro helper
|
||||
|
||||
private func Outro2(proplist outro)
|
||||
global func Particles_Smoke(...)
|
||||
{
|
||||
outro.communicator->SendCode("...---..."); // 159 frames
|
||||
return ScheduleCall(nil, Scenario.Outro3, 200, 1, outro);
|
||||
}
|
||||
|
||||
private func Outro3(proplist outro)
|
||||
{
|
||||
outro.communicator->StopCommunication();
|
||||
Dialogue->MessageBoxAll("$MsgOutro3$", GetOutroTalker(outro), true); // i wonder if anyone has heard us
|
||||
outro.plane = CreateObject(Plane, 100, main_island_y-100);
|
||||
outro.plane->SetContactDensity(85); // only collision with brick for proper landing
|
||||
outro.pilot = CreateObject(Clonk, 100, 100);
|
||||
outro.pilot->MakeInvincible();
|
||||
outro.pilot->SetSkin(2);
|
||||
outro.pilot->Enter(outro.plane);
|
||||
outro.pilot->SetAction("Walk");
|
||||
outro.pilot->SetName("$NamePilot$");
|
||||
outro.pilot->SetColor(RGB(55, 65, 75));
|
||||
outro.pilot->SetDir(DIR_Right);
|
||||
outro.plane->FaceRight();
|
||||
outro.plane->StartInstantFlight(90, 15);
|
||||
return ScheduleCall(nil, Scenario.Outro4, 5, 99999999, outro);
|
||||
}
|
||||
|
||||
private func Outro4(proplist outro)
|
||||
{
|
||||
// Wait for plane to arrive
|
||||
if (outro.plane->GetX() < outro.communicator->GetX() - 200) return true;
|
||||
ClearScheduleCall(nil, Scenario.Outro4);
|
||||
// Plane in range! Ensure players see it.
|
||||
SetPlayerZoomByViewRange(NO_OWNER, 500, 350, PLRZOOM_Direct);
|
||||
Dialogue->MessageBoxAll("$MsgOutro4$", outro.pilot, true); // hey, our friends!
|
||||
return ScheduleCall(nil, Scenario.Outro5, 100, 1, outro);
|
||||
}
|
||||
|
||||
private func Outro5(proplist outro)
|
||||
{
|
||||
Dialogue->MessageBoxAll("$MsgOutro5$", GetOutroTalker(outro), true); // we're saved!
|
||||
outro.plane->StartInstantFlight(245, 15);
|
||||
outro.plane->SetContactDensity(C4M_Solid);
|
||||
return ScheduleCall(nil, Scenario.Outro6, 60, 1, outro);
|
||||
}
|
||||
|
||||
private func Outro6(proplist outro)
|
||||
{
|
||||
outro.plane->StartInstantFlight(280, 5);
|
||||
return ScheduleCall(nil, Scenario.Outro7, 15, 1, outro);
|
||||
}
|
||||
|
||||
private func Outro7(proplist outro)
|
||||
{
|
||||
outro.plane->CancelFlight();
|
||||
return ScheduleCall(nil, Scenario.Outro8, 40, 1, outro);
|
||||
}
|
||||
|
||||
private func Outro8(proplist outro)
|
||||
{
|
||||
outro.pilot->Exit();
|
||||
Dialogue->MessageBoxAll("$MsgOutro6$", outro.pilot, true); // hop on everyone!
|
||||
return ScheduleCall(nil, Scenario.Outro9, 100, 1, outro);
|
||||
}
|
||||
|
||||
private func Outro9(proplist outro)
|
||||
{
|
||||
// Reenable crew in case players want to continue playing after round
|
||||
outro.plane->FaceRight();
|
||||
Dialogue->StopCinematics();
|
||||
return ScheduleCall(nil, Scenario.Outro10, 100, 1, outro);
|
||||
}
|
||||
|
||||
private func Outro10(proplist outro)
|
||||
{
|
||||
Sound("Fanfare");
|
||||
return GameOver();
|
||||
}
|
||||
|
||||
private func Fade2Darkness(proplist v)
|
||||
{
|
||||
v.t += 8;
|
||||
var fade_val = Max(0xff-v.t);
|
||||
SetSkyAdjust(RGB(fade_val,fade_val,fade_val));
|
||||
}
|
||||
|
||||
private func GetOutroTalker(outro)
|
||||
{
|
||||
return outro.communicator->FindObject(Find_ID(Clonk), Find_OCF(OCF_Alive), outro.communicator->Sort_Distance());
|
||||
}
|
||||
var p = inherited(...);
|
||||
if (g_intro_sky_moving)
|
||||
{
|
||||
p.ForceX = -300;
|
||||
p.DampingX = 800;
|
||||
}
|
||||
return p;
|
||||
}
|
Binary file not shown.
After Width: | Height: | Size: 4.5 KiB |
|
@ -0,0 +1,5 @@
|
|||
[Landscape]
|
||||
BottomOpen=0
|
||||
TopOpen=1
|
||||
MapZoom=20,0,5,20
|
||||
Sky=Clouds2
|
|
@ -1,8 +1 @@
|
|||
MsgIntro=Oh nein, wir sind gestranded! Wir sollten ein Kommunikationsgerät bauen und um Hilfe rufen.
|
||||
MsgOutro1=Die Maschine ist fertig. Ob sie wohl funktioniert?
|
||||
MsgOutro2=Das sieht gut aus. Ich sende ein Notsignal...
|
||||
MsgOutro3=Hoffentlich hat uns jemand gehört.
|
||||
MsgOutro4=Hey, sind das nicht unsere gestrandeten Freunde?
|
||||
MsgOutro5=Hurra, wir sind gerettet!
|
||||
MsgOutro6=Alles einsteigen! Wir fliegen zum Goldenen Berg.
|
||||
NamePilot=Pilot
|
||||
Tuesday=Dienstag
|
||||
|
|
|
@ -1,8 +1 @@
|
|||
MsgIntro=Oh no we're stranded! We need to build a communication device and call for help.
|
||||
MsgOutro1=The machine is done! I wonder whether it works.
|
||||
MsgOutro2=Looks good. Let's send a rescue signal...
|
||||
MsgOutro3=I wonder if anyone has heard us.
|
||||
MsgOutro4=Hey, isn't that our stranded friends?
|
||||
MsgOutro5=Hooray, we're saved!
|
||||
MsgOutro6=Hop on everyone, we're heading for the Golden Mountain!
|
||||
NamePilot=Pilot
|
||||
Tuesday=Tuesday
|
||||
|
|
|
@ -0,0 +1,48 @@
|
|||
// NPC Tuesday: Sits on the island and does nothing
|
||||
// (except giving some hints)
|
||||
|
||||
#appendto Dialogue
|
||||
|
||||
func Dlg_Tuesday_1(object clonk)
|
||||
{
|
||||
MessageBox("$Tuesday1$", clonk, dlg_target);
|
||||
return true;
|
||||
}
|
||||
|
||||
func Dlg_Tuesday_2(object clonk)
|
||||
{
|
||||
var options = [["$TuesdayQCommunicator$", "Dlg_Tuesday_Communicator"], ["$TuesdayQGems$", "Dlg_Tuesday_Gems"], ["$TuesdayQFish$", "Dlg_Tuesday_Fish"], ["$TuesdayQWater$", "Dlg_Tuesday_Water"], ["$TuesdayQBye$", "StopDialogue()"]];
|
||||
MessageBox("", clonk, clonk, nil, false, options);
|
||||
SetDialogueProgress(1);
|
||||
return true;
|
||||
}
|
||||
|
||||
func Dlg_Tuesday_Communicator(object clonk, q)
|
||||
{
|
||||
SetDialogueProgress(2);
|
||||
return MessageBox("$TuesdayACommunicator$", clonk);
|
||||
}
|
||||
|
||||
func Dlg_Tuesday_Gems(object clonk, q)
|
||||
{
|
||||
SetDialogueProgress(2);
|
||||
return MessageBox("$TuesdayAGems$", clonk);
|
||||
}
|
||||
|
||||
func Dlg_Tuesday_Fish(object clonk, q)
|
||||
{
|
||||
SetDialogueProgress(2);
|
||||
return MessageBox("$TuesdayAFish$", clonk);
|
||||
}
|
||||
|
||||
func Dlg_Tuesday_Water(object clonk, q)
|
||||
{
|
||||
SetDialogueProgress(10);
|
||||
return MessageBox("$TuesdayAWater$", clonk);
|
||||
}
|
||||
|
||||
func Dlg_Tuesday_10(object clonk)
|
||||
{
|
||||
SetDialogueProgress(2);
|
||||
return MessageBox("$TuesdayAWater2$", clonk);
|
||||
}
|
|
@ -0,0 +1,269 @@
|
|||
#appendto Sequence
|
||||
|
||||
static g_intro_sky_moving;
|
||||
static npc_tuesday;
|
||||
|
||||
func Intro_Start()
|
||||
{
|
||||
// Intro starts high up in the clouds
|
||||
LoadScenarioSection("Intro");
|
||||
SetWind(-100);
|
||||
SetSkyParallax(0, 20, 20, -10, 0);
|
||||
|
||||
this.plane = CreateObject(Plane, 500, 200);
|
||||
this.pilot = CreateObject(Clonk, 100, 100, NO_OWNER);
|
||||
this.pilot->MakeInvincible();
|
||||
this.pilot->MakeNonFlammable();
|
||||
this.pilot->SetSkin(2);
|
||||
this.pilot->Enter(this.plane);
|
||||
this.pilot->SetAction("Walk");
|
||||
|
||||
this.pilot->SetName("Pyrit");
|
||||
this.pilot->SetColor(0xff0000);
|
||||
this.pilot->SetDir(DIR_Left);
|
||||
this.pilot->SetObjectLayer(this.pilot);
|
||||
|
||||
this.plane.FxIntPlaneTimer = this.Intro_PlaneTimer;
|
||||
RemoveEffect("IntPlane", this.plane);
|
||||
AddEffect("IntPlane",this.plane,1,1,this.plane);
|
||||
this.plane->FaceRight();
|
||||
this.plane->StartInstantFlight(90, 0);
|
||||
g_intro_sky_moving = true;
|
||||
|
||||
|
||||
SetViewTarget(this.plane);
|
||||
|
||||
return ScheduleNext(100, 1);
|
||||
}
|
||||
|
||||
func Intro_PlaneTimer(...)
|
||||
{
|
||||
// Plane flight overload: Just move sky and have plane do turbulent movement during initial part of intro
|
||||
var rv = Call(Plane.FxIntPlaneTimer, ...);
|
||||
if (g_intro_sky_moving)
|
||||
{
|
||||
if (!Random(4)) this.rdir = BoundBy((80+Random(21)-GetR())/5,-1,1);
|
||||
SetXDir(); SetYDir(GetR()*2-GetY()+Random(5),10);
|
||||
}
|
||||
return rv;
|
||||
}
|
||||
|
||||
func Intro_JoinPlayer(int plr)
|
||||
{
|
||||
if (g_intro_done) return false; // too late for join - just join on island
|
||||
for(var index = 0, crew; crew = GetCrew(plr, index); ++index) crew->Enter(this);
|
||||
return true;
|
||||
}
|
||||
|
||||
func Intro_1()
|
||||
{
|
||||
MessageBoxAll("$Intro1$", GetHero(), true); // y clouds?
|
||||
return ScheduleNext(200);
|
||||
}
|
||||
|
||||
func Intro_2()
|
||||
{
|
||||
MessageBoxAll("$Intro2$", this.pilot, true); // cuz u told me
|
||||
return ScheduleNext(300);
|
||||
}
|
||||
|
||||
func Intro_3()
|
||||
{
|
||||
MessageBoxAll("$Intro3$", GetHero(), true); // 2 turbulent
|
||||
return ScheduleNext(200);
|
||||
}
|
||||
|
||||
func Intro_4()
|
||||
{
|
||||
MessageBoxAll("$Intro4$", this.pilot, true); // cuz condensation
|
||||
return ScheduleNext(380);
|
||||
}
|
||||
|
||||
func Intro_5()
|
||||
{
|
||||
MessageBoxAll("$Intro5$", GetHero(), true); // go lower now
|
||||
return ScheduleNext(300);
|
||||
}
|
||||
|
||||
func Intro_6()
|
||||
{
|
||||
MessageBoxAll("$Intro6$", this.pilot, true); // fuk u
|
||||
return ScheduleNext(450);
|
||||
}
|
||||
|
||||
func Intro_7()
|
||||
{
|
||||
MessageBoxAll("$Intro7$", this.pilot, true); // u fly
|
||||
return ScheduleNext(200);
|
||||
}
|
||||
|
||||
func Intro_8()
|
||||
{
|
||||
MessageBoxAll("$Intro8$", GetHero(), true); // ...
|
||||
return ScheduleNext(100);
|
||||
}
|
||||
|
||||
func Intro_9()
|
||||
{
|
||||
MessageBoxAll("$Intro9$", GetHero(), true); // ok
|
||||
return ScheduleNext(150);
|
||||
}
|
||||
|
||||
func Intro_10()
|
||||
{
|
||||
g_intro_sky_moving = false;
|
||||
this.plane.rdir = 0;
|
||||
this.plane->StartInstantFlight(this.plane->GetR(), 15);
|
||||
MessageBoxAll("$Intro10$", GetHero(), true); // aaaah
|
||||
for (var i=0,plr; i<GetPlayerCount(C4PT_User); ++i)
|
||||
{
|
||||
plr = GetPlayerByIndex(i, C4PT_User);
|
||||
for(var index = 0, crew; crew = GetCrew(plr, index); ++index)
|
||||
{
|
||||
crew->Exit();
|
||||
crew->SetPosition(this.plane->GetX()+10, this.plane->GetY());
|
||||
crew->SetAction("Tumble");
|
||||
if (!index) SetPlrView(plr, crew);
|
||||
}
|
||||
}
|
||||
SetViewTarget();
|
||||
return ScheduleNext(200, 11);
|
||||
}
|
||||
|
||||
func Intro_11()
|
||||
{
|
||||
g_intro_done = true;
|
||||
LoadScenarioSection("main");
|
||||
SetWind(0);
|
||||
SetSkyParallax(0, 20, 20, 0, 0);
|
||||
GameCall("PostIntroInitialize");
|
||||
for (var i=0,plr; i<GetPlayerCount(C4PT_User); ++i)
|
||||
{
|
||||
plr = GetPlayerByIndex(i, C4PT_User);
|
||||
GameCall("InitializePlayer", plr);
|
||||
for(var index = 0, crew; crew = GetCrew(plr, index); ++index)
|
||||
{
|
||||
crew->SetPosition(g_tuesday_pos[0],-100);
|
||||
crew->SetXDir(-10); crew->SetYDir(-30);
|
||||
if (!index) SetPlrView(plr, crew);
|
||||
}
|
||||
}
|
||||
return ScheduleNext(200, 20);
|
||||
}
|
||||
|
||||
func Intro_20()
|
||||
{
|
||||
MessageBoxAll("$Intro20$", GetHero(), true); // ouch
|
||||
for (var i=0,plr; i<GetPlayerCount(C4PT_User); ++i)
|
||||
{
|
||||
plr = GetPlayerByIndex(i, C4PT_User);
|
||||
for(var index = 0, crew; crew = GetCrew(plr, index); ++index)
|
||||
{
|
||||
crew->SetCommand("MoveTo", nil, g_tuesday_pos[0]-15+Random(20), g_tuesday_pos[1]);
|
||||
}
|
||||
}
|
||||
return ScheduleNext(300);
|
||||
}
|
||||
|
||||
func Intro_21()
|
||||
{
|
||||
Dialogue->SetSpeakerDirs(npc_tuesday, GetHero());
|
||||
MessageBoxAll("$Intro21$", npc_tuesday, true); // hi friend
|
||||
return ScheduleNext(300);
|
||||
}
|
||||
|
||||
func Intro_22()
|
||||
{
|
||||
MessageBoxAll("$Intro22$", GetHero(), true); // where is plane?
|
||||
return ScheduleNext(300);
|
||||
}
|
||||
|
||||
func Intro_23()
|
||||
{
|
||||
MessageBoxAll("$Intro23$", npc_tuesday, true); // 2 cloudy 4 plane
|
||||
return ScheduleNext(350);
|
||||
}
|
||||
|
||||
func Intro_24()
|
||||
{
|
||||
MessageBoxAll("$Intro24$", GetHero(), true); // but i need plane
|
||||
return ScheduleNext(250);
|
||||
}
|
||||
|
||||
func Intro_25()
|
||||
{
|
||||
MessageBoxAll("$Intro25$", npc_tuesday, true); // u stay here
|
||||
return ScheduleNext(300);
|
||||
}
|
||||
|
||||
func Intro_26()
|
||||
{
|
||||
MessageBoxAll("$Intro26$", GetHero(), true); // make fire?
|
||||
return ScheduleNext(300);
|
||||
}
|
||||
|
||||
func Intro_27()
|
||||
{
|
||||
MessageBoxAll("$Intro27$", npc_tuesday, true); // fire sux
|
||||
return ScheduleNext(400);
|
||||
}
|
||||
|
||||
func Intro_28()
|
||||
{
|
||||
MessageBoxAll("$Intro28$", npc_tuesday, true); // use communicator
|
||||
return ScheduleNext(300);
|
||||
}
|
||||
|
||||
func Intro_29()
|
||||
{
|
||||
MessageBoxAll("$Intro29$", GetHero(), true); // ok. where?
|
||||
return ScheduleNext(250);
|
||||
}
|
||||
|
||||
func Intro_30()
|
||||
{
|
||||
MessageBoxAll("$Intro30$", npc_tuesday, true); // not built yet
|
||||
return ScheduleNext(450);
|
||||
}
|
||||
|
||||
func Intro_31()
|
||||
{
|
||||
MessageBoxAll("$Intro31$", npc_tuesday, true); // go east and finish it with metal+gems
|
||||
return ScheduleNext(400);
|
||||
}
|
||||
|
||||
func Intro_32()
|
||||
{
|
||||
MessageBoxAll("$Intro32$", GetHero(), true); // where gems?
|
||||
return ScheduleNext(250);
|
||||
}
|
||||
|
||||
func Intro_33()
|
||||
{
|
||||
MessageBoxAll("$Intro33$", npc_tuesday, true); // fish say gems in sea
|
||||
return ScheduleNext(400);
|
||||
}
|
||||
|
||||
func Intro_34()
|
||||
{
|
||||
MessageBoxAll("$Intro34$", GetHero(), true); // fish talk?
|
||||
return ScheduleNext(150);
|
||||
}
|
||||
|
||||
func Intro_35()
|
||||
{
|
||||
MessageBoxAll("$Intro35$", npc_tuesday, true); // coconut talk!
|
||||
return ScheduleNext(200);
|
||||
}
|
||||
|
||||
func Intro_36()
|
||||
{
|
||||
MessageBoxAll("$Intro36$", GetHero(), true); // ok...
|
||||
return ScheduleNext(150);
|
||||
}
|
||||
|
||||
func Intro_37()
|
||||
{
|
||||
npc_tuesday->SetDialogue("Tuesday", true);
|
||||
return Stop();
|
||||
}
|
|
@ -0,0 +1,106 @@
|
|||
#appendto Sequence
|
||||
|
||||
func Outro_Start()
|
||||
{
|
||||
this.communicator = FindObject(Find_Func("IsCrystalCommunicator"));
|
||||
if (!this.communicator) return false; // what?
|
||||
this.hero = this.communicator->FindObject(Find_ID(Clonk), Find_OCF(OCF_Alive), this.communicator->Sort_Distance());
|
||||
SetViewTarget(this.communicator);
|
||||
// Outro
|
||||
ScheduleCall(nil, this.Outro_Fade2Darkness, 15, 32, {});
|
||||
Dialogue->MessageBoxAll("$Outro1$", this.hero, true); // ok turn it on
|
||||
return ScheduleNext(100);
|
||||
}
|
||||
|
||||
func Outro_0()
|
||||
{
|
||||
this.communicator->StartCommunication(); // 250 frames
|
||||
return ScheduleNext(650);
|
||||
}
|
||||
|
||||
func Outro_1()
|
||||
{
|
||||
Dialogue->MessageBoxAll("$Outro2$", this.hero, true); // let's see if it works
|
||||
return ScheduleNext(50);
|
||||
}
|
||||
|
||||
func Outro_2()
|
||||
{
|
||||
this.communicator->SendCode("...---..."); // 159 frames
|
||||
return ScheduleNext(200);
|
||||
}
|
||||
|
||||
func Outro_3()
|
||||
{
|
||||
this.communicator->StopCommunication();
|
||||
MessageBoxAll("$Outro3$", this.hero, true); // i wonder if anyone has heard us
|
||||
this.plane = CreateObject(Plane, 100, main_island_y-100);
|
||||
this.plane->SetContactDensity(85); // only collision with brick for proper landing
|
||||
this.pilot = CreateObject(Clonk, 100, 100);
|
||||
this.pilot->MakeInvincible();
|
||||
this.pilot->SetSkin(2);
|
||||
this.pilot->Enter(this.plane);
|
||||
this.pilot->SetAction("Walk");
|
||||
this.pilot->SetName("Pyrit");
|
||||
this.pilot->SetColor(0xff0000);
|
||||
this.pilot->SetDir(DIR_Right);
|
||||
this.plane->FaceRight();
|
||||
this.plane->StartInstantFlight(90, 15);
|
||||
return ScheduleNext(5);
|
||||
}
|
||||
|
||||
func Outro_4()
|
||||
{
|
||||
// Wait for plane to arrive
|
||||
if (this.plane->GetX() < this.communicator->GetX() - 200) return ScheduleSame(5);
|
||||
// Plane in range! Ensure players see it.
|
||||
SetPlayerZoomByViewRange(NO_OWNER, 500, 350, PLRZOOM_Direct | PLRZOOM_LimitMax);
|
||||
MessageBoxAll("$Outro4$", this.pilot, true); // hey, our friends!
|
||||
return ScheduleNext(100);
|
||||
}
|
||||
|
||||
func Outro_5()
|
||||
{
|
||||
MessageBoxAll("$Outro5$", this.hero, true); // we're saved!
|
||||
this.plane->StartInstantFlight(245, 15);
|
||||
this.plane->SetContactDensity(C4M_Solid);
|
||||
return ScheduleNext(60);
|
||||
}
|
||||
|
||||
func Outro_6()
|
||||
{
|
||||
this.plane->StartInstantFlight(280, 5);
|
||||
return ScheduleNext(15);
|
||||
}
|
||||
|
||||
func Outro_7()
|
||||
{
|
||||
this.plane->CancelFlight();
|
||||
return ScheduleNext(40);
|
||||
}
|
||||
|
||||
func Outro_8()
|
||||
{
|
||||
this.pilot->Exit();
|
||||
MessageBoxAll("$Outro6$", this.pilot, true); // hop on everyone!
|
||||
return ScheduleNext(100);
|
||||
}
|
||||
|
||||
func Outro_9()
|
||||
{
|
||||
this.plane->FaceRight();
|
||||
return ScheduleNext(100);
|
||||
}
|
||||
|
||||
func Outro_10()
|
||||
{
|
||||
Sound("Fanfare");
|
||||
return GameOver();
|
||||
}
|
||||
|
||||
func Outro_Fade2Darkness(proplist v)
|
||||
{
|
||||
v.t += 8;
|
||||
var fade_val = Max(0xff-v.t);
|
||||
SetSkyAdjust(RGB(fade_val,fade_val,fade_val));
|
||||
}
|
|
@ -0,0 +1,48 @@
|
|||
Intro1=Pyrit, warum müssen wir in den Wolken fliegen?
|
||||
Intro2=Du sagtest, wir sollen höher fliegen, nachdem wir fast im Vulkan gelandet waren.
|
||||
Intro3=Es ist schrecklich turbulent hier.
|
||||
Intro4=Das liegt daran, dass die Kondensation des Wassers in den Wolken Wärme freisetzt, die die Luft weiter aufsteigen lässt.
|
||||
Intro5=Danke für den Vortrag. Können wir nun bitte tiefer fliegen?
|
||||
Intro6=Erst ist es zu turbulent wenn ich tief fliege. Nun ist es zu turbulent wenn ich hoch fliege.
|
||||
Intro7=Warum steuerst du das Flugzeug nicht einfach selber?
|
||||
Intro8=...
|
||||
Intro9=Okay. Wir tauschen Plätze!
|
||||
Intro10=Aaaah
|
||||
|
||||
Intro20=Autsch.
|
||||
Intro21=Oh. Ein Freund ist vom Himmel gefallen. Hallo Freund! Mein Name ist Dienstag.
|
||||
Intro22=Verdammt. Hast du unser Flugzeug gesehen? Ich bin versehentlich raus gefallen.
|
||||
Intro23=Der Himmel ist hier stets bewölkt. Wir sehen kein Flugzeug und kein Flugzeug sieht uns.
|
||||
Intro24=Ugh. Aber Pyrit muss uns irgendwie finden.
|
||||
Intro25=Was auf der Insel strandet bleibt auf der Insel. Genau wie ich.
|
||||
Intro26=Könnten wir nicht ein Feuer machen oder so?
|
||||
Intro27=Feuer? Das wird nicht helfen. Kokosnussholz brennt schlecht und das Feuer würde durch die Wolken eh keiner sehen.
|
||||
Intro28=Aber...wir könnten meinen <c ffff00>Kristallkommunikator</c> benutzen!
|
||||
Intro29=Klingt gut. Wo steht der?
|
||||
Intro30=Ich bin glücklich auf meiner Insel. Warum sollte ich ein Kommunikationsgerät bauen? Ich habe die Pläne fertig, aber mich nie bemüht es auch zu bauen.
|
||||
Intro31=Die Baustelle und die Pläne befinden sich am Östlichen Ende dieser Insel. Du brauchst nur etwas Metall und ein paar Edelsteine.
|
||||
Intro32=Metall klingt einfach. Aber wo finde ich Edelsteine?
|
||||
Intro33=Die Fische sprechen manchmal über blityende Edelsteine tief unten im Meer. Vielleicht kannst du die abbauen?
|
||||
Intro34=Fische sprechen mit dir?
|
||||
Intro35=Wenn du nur zuhörst, sprechen sogar die Kokosnüsse!
|
||||
Intro36=Okay...ich schaue mal nach der Baustelle.
|
||||
|
||||
Tuesday1=Hallo, Freund. Wie kann ich dir helfen?
|
||||
TuesdayQCommunicator=Wie benutze ich den Kommunikator?
|
||||
TuesdayACommunicator=Bringe einfach das nötige Material zur Baustelle. Es wird automatisch funktionieren, wenn du es fertig stellst.
|
||||
TuesdayQGems=Wo finde ich Edelsteine?
|
||||
TuesdayAGems=Tauche ins Meer hinein. Die größten Schätze lagern tief unten und sind schwer erreichbar.
|
||||
TuesdayQFish=Kannst du die Fische weg schicken?
|
||||
TuesdayAFish=Ich bin nur ein Zuhörer. Ich belaste die freien Geschöpfe dieser Welt nicht mit unnötigen Verboten.
|
||||
TuesdayQWater=Das wasser ist zu Tief. Wie komme ich an die Edelsteine?
|
||||
TuesdayAWater=Du könntest probieren, Wandbausätze{{WallKit}} in der Werkzeughütte{{ToolsWorkshop}} zu bauen. Wandbausätze können benutzt werden, um stabile Wände auch unter Wasser zu errichten. Diese schützen dich vor den Fischen und schaffen Raum zum Atmen.
|
||||
TuesdayAWater2=Mit Wandbausätzen und einer Pumpe solltest du die Edelsteine erreichen können.
|
||||
TuesdayQBye=Tschüss.
|
||||
|
||||
Outro1=Die Maschine ist fertig. Ob sie wohl funktioniert?
|
||||
Outro2=Das sieht gut aus. Ich sende ein Notsignal...
|
||||
Outro3=Hoffentlich hat uns jemand gehört.
|
||||
Outro4=Hey, sind das nicht unsere gestrandeten Freunde?
|
||||
Outro5=Hurra, wir sind gerettet!
|
||||
Outro6=Alles einsteigen! Wir fliegen zum Goldenen Berg.
|
||||
|
|
@ -0,0 +1,47 @@
|
|||
Intro1=Pyrit, why do we have to fly in the clouds?
|
||||
Intro2=You told me to fly higher after we almost crashed into the volcano.
|
||||
Intro3=It's horribly turbulent in here.
|
||||
Intro4=That's because water condensation in the cloud frees up energy which heats up the air.
|
||||
Intro5=Thanks for the lecture. Now can we please fly lower again?
|
||||
Intro6=First it's too turbulent when i fly low over the volcano and now it's too turbulent when i fly up high in the clouds.
|
||||
Intro7=Why don't you just steer the plane yourself?
|
||||
Intro8=...
|
||||
Intro9=Alright. Let's swap places.
|
||||
Intro10=Aaaah
|
||||
|
||||
Intro20=Ouch.
|
||||
Intro21=Oh, a friend has fallen from the sky. Hello friend! My name is Tuesday.
|
||||
Intro22=Damn. Have you seen our airplane? I accidentally dropped out of it.
|
||||
Intro23=The sky is always cloudy here. We won't see any planes and planes won't see us.
|
||||
Intro24=Ugh. But i need Pyrit to find me somehow.
|
||||
Intro25=What lands on the island stays on the island. Just like me.
|
||||
Intro26=Isn't there any way we could make a fire or something?
|
||||
Intro27=Fire? That will do no good. Coconut wood doesn't burn well and it won't be seen through the clouds.
|
||||
Intro28=But...we could use my <c ffff00>crystal communicator</c>!
|
||||
Intro29=Sounds good. Where is it?
|
||||
Intro30=I'm happy on this island. Why should i build a communication device? I've made plans but I haven't bothered to finish building it.
|
||||
Intro31=The site and plans how to finish it are at the eastern end of this island. It just needs some metal and some gems.
|
||||
Intro32=Metal sounds easy enough? Where can I find the gems?
|
||||
Intro33=The fish sometimes talk about gem reserves deep below the ocean ground. Maybe you can mine those?
|
||||
Intro34=Fish talk to you?
|
||||
Intro35=If you listen carefully, even coconuts talk!
|
||||
Intro36=Okay...i'll see if i can finish this construction.
|
||||
|
||||
Tuesday1=Hello, friend. How can I help you?
|
||||
TuesdayQCommunicator=How do I use the communicator?
|
||||
TuesdayACommunicator=Just bring the necessery materials to the construction site. It should work automatically when completed.
|
||||
TuesdayQGems=Where can I find gems?
|
||||
TuesdayAGems=Try to dive underground.
|
||||
TuesdayQFish=Can you tell the fish to go away?
|
||||
TuesdayAFish=I'm a listener. I do not force restraints onto the free creatures of this world.
|
||||
TuesdayQWater=The water is too deep. How can I reach the gems?
|
||||
TuesdayAWater=You could try and build wall kits{{WallKit}} in the tools workshop{{ToolsWorkshop}}. Wall kits can be used to construct stable walls under water protect you from fish and give some room to breath.
|
||||
TuesdayAWater2=Using wall kits and a pump, you might be able to solve your problems.
|
||||
TuesdayQBye=Bye
|
||||
|
||||
Outro1=The machine is done! I wonder whether it works.
|
||||
Outro2=Looks good. Let's send a rescue signal...
|
||||
Outro3=I wonder if anyone has heard us.
|
||||
Outro4=Hey, isn't that our stranded friends?
|
||||
Outro5=Hooray, we're saved!
|
||||
Outro6=Hop on everyone, we're heading for the Golden Mountain!
|
|
@ -3,6 +3,7 @@ Title=Raid
|
|||
Version=5,4
|
||||
Difficulty=10
|
||||
NoInitialize=true
|
||||
Icon=37
|
||||
|
||||
[Definitions]
|
||||
Definition2=Decoration.ocd
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
Splits missions between those within (above line) and those outside (below line) storyline.
|
|
@ -0,0 +1,5 @@
|
|||
[Head]
|
||||
Title=------------
|
||||
MissionAccess=NEVER
|
||||
Difficulty=49
|
||||
Icon=0
|
|
@ -1,9 +1,10 @@
|
|||
[Head]
|
||||
Icon=36
|
||||
Icon=15
|
||||
Title=TreasureHunt
|
||||
Version=5,4
|
||||
Difficulty=30
|
||||
Difficulty=40
|
||||
NoInitialize=true
|
||||
MissionAccess=S2Sea
|
||||
|
||||
[Definitions]
|
||||
Definition2=Decoration.ocd
|
||||
|
|
|
@ -9,6 +9,12 @@ static g_is_initialized; // set after first player join
|
|||
static g_max_player_num; // max number of players that were ever joined
|
||||
static g_plr_inventory; // array indexed by players: Array containing inventory of Clonk jsut before it died
|
||||
|
||||
func Initialize()
|
||||
{
|
||||
SetNextMission("Mission.ocf/DarkCastle.ocs");
|
||||
return true;
|
||||
}
|
||||
|
||||
func DoInit(int first_player)
|
||||
{
|
||||
CreateObject(Flagpole, 210,1185, first_player);
|
||||
|
@ -137,6 +143,7 @@ func OnGoldBarCollected(object collecter)
|
|||
|
||||
func OnGameOver()
|
||||
{
|
||||
GainMissionAccess("S2Treasure");
|
||||
// Treasure was collected!
|
||||
UpdateLeagueScores();
|
||||
return true;
|
||||
|
@ -163,3 +170,4 @@ func OnInvincibleDamage(object damaged_target)
|
|||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -114,18 +114,18 @@ func Destruction()
|
|||
|
||||
/* Sequence callbacks */
|
||||
|
||||
func ScheduleNext(int delay, int skip)
|
||||
func ScheduleNext(int delay, next_idx)
|
||||
{
|
||||
return ScheduleCall(this, this.CallNext, delay, 1, skip);
|
||||
return ScheduleCall(this, this.CallNext, delay, 1, next_idx);
|
||||
}
|
||||
|
||||
func ScheduleSame(int delay) { return ScheduleNext(delay, -1); }
|
||||
func ScheduleSame(int delay) { return ScheduleNext(delay, seq_progress); }
|
||||
|
||||
func CallNext(int skip)
|
||||
func CallNext(next_idx)
|
||||
{
|
||||
// Start conversation context.
|
||||
// Update dialogue progress first.
|
||||
seq_progress += skip+1;
|
||||
if (GetType(next_idx)) seq_progress = next_idx; else ++seq_progress;
|
||||
// Then call relevant functions.
|
||||
var fn_progress = Format("%s_%d", seq_name, seq_progress);
|
||||
if (!Call(fn_progress))
|
||||
|
@ -146,6 +146,14 @@ public func SetViewTarget(object view_target)
|
|||
UpdateViewTarget(view_target);
|
||||
ScheduleCall(this, this.UpdateViewTarget, 30, 999999999, view_target);
|
||||
}
|
||||
else
|
||||
{
|
||||
for (var i=0; i<GetPlayerCount(C4PT_User); ++i)
|
||||
{
|
||||
var plr = GetPlayerByIndex(i, C4PT_User);
|
||||
SetPlrView(plr, GetCursor(plr));
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -181,6 +189,66 @@ private func MessageBox(string message, object clonk, object talker, int for_pla
|
|||
}
|
||||
|
||||
|
||||
// Helper function to get a speaker in sequences
|
||||
func GetHero(object nearest_obj)
|
||||
{
|
||||
// prefer object stored as hero - if not assigned, find someone close to specified object
|
||||
if (!this.hero)
|
||||
if (nearest_obj)
|
||||
this.hero = nearest_obj->FindObject(Find_ID(Clonk), Find_Not(Find_Owner()), nearest_obj->Sort_Distance());
|
||||
else
|
||||
this.hero = FindObject(Find_ID(Clonk), Find_Not(Find_Owner(NO_OWNER)));
|
||||
// if there is still no hero, take any clonk. let the NPCs do the serquence among themselves
|
||||
// (to prevent null pointer exceptions if all players left during the sequence)
|
||||
if (!this.hero) this.hero = FindObject(Find_ID(Clonk));
|
||||
// might return zero if all players are gone and there are no NPCs. well, there was noone to listen anyway.
|
||||
return this.hero;
|
||||
}
|
||||
|
||||
|
||||
/* Scenario section helper functions */
|
||||
|
||||
// Scenario section overload: Automatically transfers all player clonks
|
||||
func LoadScenarioSection(name, ...)
|
||||
{
|
||||
// Store objects: All clonks and sequence object
|
||||
this.save_objs = [];
|
||||
AddSectSaveObj(this);
|
||||
var iplr,plr;
|
||||
for (iplr=0; iplr<GetPlayerCount(C4PT_User); ++iplr)
|
||||
{
|
||||
plr = GetPlayerByIndex(iplr, C4PT_User);
|
||||
for (var icrew=0,crew; icrew<GetCrewCount(iplr); ++icrew)
|
||||
if (crew = GetCrew(plr, icrew))
|
||||
AddSectSaveObj(crew);
|
||||
}
|
||||
var save_objs = this.save_objs;
|
||||
// Load new section
|
||||
var result = inherited(name, ...);
|
||||
// Restore objects
|
||||
for (var obj in save_objs) if (obj) obj->SetObjectStatus(C4OS_NORMAL);
|
||||
if (this) this.save_objs = nil;
|
||||
// Recover HUD
|
||||
for (iplr=0; iplr<GetPlayerCount(C4PT_User); ++iplr)
|
||||
{
|
||||
plr = GetPlayerByIndex(iplr, C4PT_User);
|
||||
var HUDcontroller = FindObject(Find_ID(GUI_Controller), Find_Owner(plr));
|
||||
if (!HUDcontroller) HUDcontroller = CreateObject(GUI_Controller, 10, 10, plr);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
// flag obj and any contained stuff for scenario saving
|
||||
func AddSectSaveObj(obj)
|
||||
{
|
||||
if (!obj) return false;
|
||||
this.save_objs[GetLength(this.save_objs)] = obj;
|
||||
var cont,i=0;
|
||||
while (cont = obj->Contents(i++)) AddSectSaveObj(cont);
|
||||
return obj->SetObjectStatus(C4OS_INACTIVE);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/* Global helper functions */
|
||||
|
|
Loading…
Reference in New Issue