improve tutorial 08 end sequence checks and dialogue

install-platforms
Maikel de Vries 2018-01-08 11:12:21 +01:00
parent 08393d2300
commit 5e69a753ad
4 changed files with 24 additions and 5 deletions

View File

@ -101,6 +101,7 @@ private func InitMines()
lantern->TurnOn();
var lorry = CreateObjectAbove(Lorry, 596, 886);
lorry->CreateContents(Metal, 32);
lorry.is_metal_lorry = true;
// Another lorry with coal and ore in the lower part of the mines.
var lorry = CreateObjectAbove(Lorry, 517, 974);
@ -410,11 +411,12 @@ protected func OnGuideMessageShown(int plr, int index)
{
if (index == 0)
{
TutArrowShowTarget(FindObject(Find_ID(Clonk), Find_AtPoint(218, 182)));
TutArrowShowTarget(FindObject(Find_ID(Clonk), Find_AtPoint(218, 182), Find_Not(Find_Owner(plr))));
}
if (index == 2)
{
TutArrowShowPos(302, 270, 180);
TutArrowShowTarget(FindObject(Find_ID(Lorry), Find_Property("is_metal_lorry")));
}
if (index == 3)
{
@ -424,7 +426,7 @@ protected func OnGuideMessageShown(int plr, int index)
if (index == 4)
{
TutArrowShowPos(292, 850, 180);
TutArrowShowTarget(FindObject(Find_ID(Clonk), Find_AtPoint(604, 806)));
TutArrowShowTarget(FindObject(Find_ID(Clonk), Find_AtPoint(604, 806), Find_Not(Find_Owner(plr))));
}
if (index == 6)
{
@ -437,7 +439,7 @@ protected func OnGuideMessageShown(int plr, int index)
}
if (index == 9)
{
TutArrowShowTarget(FindObject(Find_ID(Clonk), Find_AtPoint(218, 182)));
TutArrowShowTarget(FindObject(Find_ID(Clonk), Find_AtPoint(218, 182), Find_Not(Find_Owner(plr))));
}
return;
}

View File

@ -11,15 +11,30 @@ public func Dlg_Chief_Init(object clonk)
public func Dlg_Chief_1(object clonk)
{
var found_lorry = false;
for (var lorry in FindObjects(Find_ID(Lorry), Find_InRect(AbsX(0), AbsY(160), 280, 40)))
if (ObjectCount(Find_ID(Metal), Find_Container(lorry)) >= 32)
for (var lorry in FindObjects(Find_ID(Lorry), Find_InRect(AbsX(0), AbsY(120), 320, 72)))
if (lorry.is_metal_lorry)
found_lorry = true;
var made_lorry_progress = false;
var elevator_case = FindObject(Find_ID(ElevatorCase), Find_AtRect(AbsX(282), AbsY(160), 20, 720));
if (elevator_case)
{
for (var lorry in elevator_case->FindObjects(Find_ID(Lorry), Find_AtPoint()))
if (lorry.is_metal_lorry)
made_lorry_progress = true;
}
if (found_lorry)
{
MessageBox("$DlgChiefLorry$", clonk, clonk);
SetDialogueProgress(8);
}
else if (made_lorry_progress)
{
MessageBox("$DlgChiefLorryUp$", clonk, dlg_target);
StopDialogue();
SetDialogueProgress(1);
}
else
{
MessageBox("$DlgChiefHello$", clonk, dlg_target);

View File

@ -9,6 +9,7 @@ DlgChiefMetal=Ja, natürlich. Du darfst alles Metall behalten, wenn du nach hier
DlgChiefLorry=Hier ist die Lore mit dem Metall!
DlgChiefKeepLorry=Klasse gemacht. Wir können jetzt die gleiche Methode anwenden, um die Mine weiter auszubeuten. Du kannst alles Metall behalten.
DlgChiefReally=Du kannst wirklich die Lore und das Metall behalten.
DlgChiefLorryUp=Fast geschafft! Rufe den Fahrstuhl um die Lore hier hoch zu kriegen.
# Dialogue: Miner
DlgMinerGreeting=Hallo, ich bin %s. Bist du einer der Minenleute hier?

View File

@ -9,6 +9,7 @@ DlgChiefMetal=Yes, of course. The metal you can get to the surface you may keep,
DlgChiefLorry=I got the lorry with metal up to the surface!
DlgChiefKeepLorry=That's great, now we can use your method to keep excavating the mine! You may keep the lorry and its contents.
DlgChiefReally=You can really keep the lorry and the metal.
DlgChiefLorryUp=Almost there! Get the lorry up to the surface by calling the elevator.
# Dialogue: Miner
DlgMinerGreeting=Hi, I am %s, are you one of the miners?