add tutorial 2

shapetextures
Maikel de Vries 2015-09-13 15:03:15 +02:00
parent 78f7b76b0e
commit 225f4b1559
12 changed files with 708 additions and 0 deletions

View File

@ -0,0 +1,31 @@
{\rtf1\ansi\deff3\adeflang1025
{\fonttbl{\f0\froman\fprq2\fcharset0 Times New Roman;}{\f1\froman\fprq2\fcharset2 Symbol;}{\f2\fswiss\fprq2\fcharset0 Arial;}{\f3\froman\fprq2\fcharset0 Liberation Serif{\*\falt Times New Roman};}{\f4\froman\fprq0\fcharset128 Arial;}{\f5\froman\fprq0\fcharset128 Times New Roman;}{\f6\fswiss\fprq0\fcharset128 Arial;}{\f7\fnil\fprq0\fcharset128 Mangal;}{\f8\fnil\fprq2\fcharset0 FreeSans;}{\f9\fswiss\fprq0\fcharset128 FreeSans;}{\f10\fnil\fprq2\fcharset0 Arial;}}
{\colortbl;\red0\green0\blue0;\red128\green128\blue128;}
{\stylesheet{\s0\snext0\ql\nowidctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf1\kerning1\dbch\af7\langfe2052\dbch\af10\afs24\alang1081\loch\f5\fs24\lang1043 Normal;}
{\s15\sbasedon0\snext16\ql\nowidctlpar\sb240\sa120\keepn\ltrpar\cf1\kerning1\dbch\af7\langfe2052\dbch\af8\afs28\alang1081\loch\f6\fs28\lang1043 Heading;}
{\s16\sbasedon0\snext16\sl288\slmult1\ql\nowidctlpar\sb0\sa120\ltrpar\cf1\kerning1\dbch\af7\langfe2052\dbch\af10\afs24\alang1081\loch\f5\fs24\lang1043 Text Body;}
{\s17\sbasedon16\snext17\sl288\slmult1\ql\nowidctlpar\sb0\sa120\ltrpar\cf1\kerning1\dbch\af7\langfe2052\dbch\af9\afs24\alang1081\loch\f5\fs24\lang1043 List;}
{\s18\sbasedon0\snext18\ql\nowidctlpar\sb120\sa120\noline\ltrpar\cf1\i\kerning1\dbch\af7\langfe2052\dbch\af9\afs24\alang1081\ai\loch\f5\fs24\lang1043 Caption;}
{\s19\sbasedon0\snext19\ql\nowidctlpar\noline\ltrpar\cf1\kerning1\dbch\af7\langfe2052\dbch\af9\afs24\alang1081\loch\f5\fs24\lang1043 Index;}
}{\info{\creatim\yr0\mo0\dy0\hr0\min0}{\revtim\yr0\mo0\dy0\hr0\min0}{\printim\yr0\mo0\dy0\hr0\min0}{\comment LibreOffice}{\vern67241986}}\deftab720
\viewscale100
{\*\pgdsctbl
{\pgdsc0\pgdscuse451\pgwsxn12240\pghsxn15840\marglsxn1800\margrsxn1800\margtsxn1440\margbsxn1440\pgdscnxt0 Default Style;}}
\formshade{\*\pgdscno0}\paperh15840\paperw12240\margl1800\margr1800\margt1440\margb1440\sectd\sbknone\sectunlocked1\pgndec\pgwsxn12240\pghsxn15840\marglsxn1800\margrsxn1800\margtsxn1440\margbsxn1440\ftnbj\ftnstart1\ftnrstcont\ftnnar\aenddoc\aftnrstcont\aftnstart1\aftnnrlc
\pgndec\pard\plain \s0\ql\nowidctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf1\kerning1\dbch\af7\langfe2052\dbch\af10\afs24\alang1081\loch\f5\fs24\lang1043{\cf1\b\rtlch \ltrch\loch\fs20\lang1033\loch\f4
Barrieren Bomben}
\par \pard\plain \s0\ql\nowidctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf1\kerning1\dbch\af7\langfe2052\dbch\af10\afs24\alang1081\loch\f5\fs24\lang1043\cf1\b\rtlch \ltrch\loch\fs20\lang1033\loch\f4
\par \pard\plain \s0\ql\nowidctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf1\kerning1\dbch\af7\langfe2052\dbch\af10\afs24\alang1081\loch\f5\fs24\lang1043{\cf1\b0\rtlch \ltrch\loch\fs16\lang1033\loch\f4
Your little friend ran off once again, but now he is trapped and needs your help. }
\par \pard\plain \s0\ql\nowidctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf1\kerning1\dbch\af7\langfe2052\dbch\af10\afs24\alang1081\loch\f5\fs24\lang1043\cf1\rtlch \ltrch\loch
\par \pard\plain \s0\ql\nowidctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf1\kerning1\dbch\af7\langfe2052\dbch\af10\afs24\alang1081\loch\f5\fs24\lang1043{\cf1\b0\rtlch \ltrch\loch\fs16\lang1033\loch\f4
Goal: locate and free your little friend.}
\par \pard\plain \s0\ql\nowidctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf1\kerning1\dbch\af7\langfe2052\dbch\af10\afs24\alang1081\loch\f5\fs24\lang1043\cf1\rtlch \ltrch\loch
\par \pard\plain \s0\ql\nowidctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf1\kerning1\dbch\af7\langfe2052\dbch\af10\afs24\alang1081\loch\f5\fs24\lang1043{\cf1\b0\rtlch \ltrch\loch\fs16\lang1033\loch\f4
Tutorial explains: inventory, collecting, throwing, }{\cf1\b0\rtlch \ltrch\loch\fs16\lang1033\loch\f4
dropping}{\cf1\b0\rtlch \ltrch\loch\fs16\lang1033\loch\f4
and using items.}
\par }

View File

@ -0,0 +1,31 @@
{\rtf1\ansi\deff3\adeflang1025
{\fonttbl{\f0\froman\fprq2\fcharset0 Times New Roman;}{\f1\froman\fprq2\fcharset2 Symbol;}{\f2\fswiss\fprq2\fcharset0 Arial;}{\f3\froman\fprq2\fcharset0 Liberation Serif{\*\falt Times New Roman};}{\f4\froman\fprq0\fcharset128 Arial;}{\f5\froman\fprq0\fcharset128 Times New Roman;}{\f6\fswiss\fprq0\fcharset128 Arial;}{\f7\fnil\fprq0\fcharset128 Mangal;}{\f8\fnil\fprq2\fcharset0 FreeSans;}{\f9\fswiss\fprq0\fcharset128 FreeSans;}{\f10\fnil\fprq2\fcharset0 Times New Roman;}}
{\colortbl;\red0\green0\blue0;\red128\green128\blue128;}
{\stylesheet{\s0\snext0\ql\nowidctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf1\kerning1\dbch\af7\langfe2052\dbch\af10\afs24\alang1081\loch\f5\fs24\lang1043 Normal;}
{\s15\sbasedon0\snext16\ql\nowidctlpar\sb240\sa120\keepn\ltrpar\cf1\kerning1\dbch\af7\langfe2052\dbch\af8\afs28\alang1081\loch\f6\fs28\lang1043 Heading;}
{\s16\sbasedon0\snext16\sl288\slmult1\ql\nowidctlpar\sb0\sa120\ltrpar\cf1\kerning1\dbch\af7\langfe2052\dbch\af10\afs24\alang1081\loch\f5\fs24\lang1043 Text Body;}
{\s17\sbasedon16\snext17\sl288\slmult1\ql\nowidctlpar\sb0\sa120\ltrpar\cf1\kerning1\dbch\af7\langfe2052\dbch\af9\afs24\alang1081\loch\f5\fs24\lang1043 List;}
{\s18\sbasedon0\snext18\ql\nowidctlpar\sb120\sa120\noline\ltrpar\cf1\i\kerning1\dbch\af7\langfe2052\dbch\af9\afs24\alang1081\ai\loch\f5\fs24\lang1043 Caption;}
{\s19\sbasedon0\snext19\ql\nowidctlpar\noline\ltrpar\cf1\kerning1\dbch\af7\langfe2052\dbch\af9\afs24\alang1081\loch\f5\fs24\lang1043 Index;}
}{\info{\creatim\yr0\mo0\dy0\hr0\min0}{\revtim\yr0\mo0\dy0\hr0\min0}{\printim\yr0\mo0\dy0\hr0\min0}{\comment LibreOffice}{\vern67241986}}\deftab720
\viewscale100
{\*\pgdsctbl
{\pgdsc0\pgdscuse451\pgwsxn12240\pghsxn15840\marglsxn1800\margrsxn1800\margtsxn1440\margbsxn1440\pgdscnxt0 Default Style;}}
\formshade{\*\pgdscno0}\paperh15840\paperw12240\margl1800\margr1800\margt1440\margb1440\sectd\sbknone\sectunlocked1\pgndec\pgwsxn12240\pghsxn15840\marglsxn1800\margrsxn1800\margtsxn1440\margbsxn1440\ftnbj\ftnstart1\ftnrstcont\ftnnar\aenddoc\aftnrstcont\aftnstart1\aftnnrlc
\pgndec\pard\plain \s0\ql\nowidctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf1\kerning1\dbch\af7\langfe2052\dbch\af10\afs24\alang1081\loch\f5\fs24\lang1043{\cf1\b\rtlch \ltrch\loch\fs20\lang1033\loch\f4
Bombing Barriers}
\par \pard\plain \s0\ql\nowidctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf1\kerning1\dbch\af7\langfe2052\dbch\af10\afs24\alang1081\loch\f5\fs24\lang1043\cf1\b\rtlch \ltrch\loch\fs20\lang1033\loch\f4
\par \pard\plain \s0\ql\nowidctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf1\kerning1\dbch\af7\langfe2052\dbch\af10\afs24\alang1081\loch\f5\fs24\lang1043{\cf1\b0\rtlch \ltrch\loch\fs16\lang1033\loch\f4
Your little friend ran off once again, but now he is trapped and needs your help. }
\par \pard\plain \s0\ql\nowidctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf1\kerning1\dbch\af7\langfe2052\dbch\af10\afs24\alang1081\loch\f5\fs24\lang1043\cf1\rtlch \ltrch\loch
\par \pard\plain \s0\ql\nowidctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf1\kerning1\dbch\af7\langfe2052\dbch\af10\afs24\alang1081\loch\f5\fs24\lang1043{\cf1\b0\rtlch \ltrch\loch\fs16\lang1033\loch\f4
Goal: locate and free your little friend.}
\par \pard\plain \s0\ql\nowidctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf1\kerning1\dbch\af7\langfe2052\dbch\af10\afs24\alang1081\loch\f5\fs24\lang1043\cf1\rtlch \ltrch\loch
\par \pard\plain \s0\ql\nowidctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf1\kerning1\dbch\af7\langfe2052\dbch\af10\afs24\alang1081\loch\f5\fs24\lang1043{\cf1\b0\rtlch \ltrch\loch\fs16\lang1033\loch\f4
Tutorial explains: inventory, collecting, throwing, }{\cf1\b0\rtlch \ltrch\loch\fs16\lang1033\loch\f4
dropping}{\cf1\b0\rtlch \ltrch\loch\fs16\lang1033\loch\f4
and using items.}
\par }

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

View File

@ -0,0 +1,22 @@
[Head]
Icon=3
Title=Tutorial02
Version=6,0
MaxPlayer=1
Difficulty=2
[Definitions]
Definition1=Objects.ocd
[Player1]
Crew=Clonk=1
[Landscape]
Sky=Clouds1
SkyScrollMode=2
[Weather]
Climate=0,0,0,100
StartSeason=0,0,0,100
YearSpeed=0,0,0,100
Wind=1,100,-100,100

View File

@ -0,0 +1,477 @@
/**
Tutorial 02: Bombing Barriers
Author: Maikel
Again your wipf is lost: explains items, collection, inventory management, using them and throwing them.
Following controls and concepts are explained:
* Collection of objects
* Inventory control
* Throwing items: firestones
* Dropping items: mushroom/berries
* Using items: shovel, loam
* Liquids: acid
*/
static guide; // guide object.
protected func Initialize()
{
// Tutorial goal.
var goal = CreateObject(Goal_Tutorial);
goal.Name = "$MsgGoalName$";
goal.Description = "$MsgGoalDescription$";
// Set the mood.
SetSkyParallax(0, 20, 20);
// Place objects in different sections.
InitCaveEntrance();
InitCaveMiddle();
InitCaveBottom();
InitCliffTop();
InitAcidLake();
InitVegetation();
InitAnimals();
// Dialogue options -> repeat round.
SetNextMission("Tutorials.ocf\\Tutorial02.ocs", "$MsgRepeatRound$", "$MsgRepeatRoundDesc$");
return;
}
// Gamecall from goals, set next mission.
protected func OnGoalsFulfilled()
{
// Achievement: Tutorial completed.
GainScenarioAchievement("TutorialCompleted", 3);
// Dialogue options -> next round.
SetNextMission("Tutorials.ocf\\Tutorial03.ocs", "$MsgNextTutorial$", "$MsgNextTutorialDesc$");
// Normal scenario ending by goal library.
return false;
}
private func InitCaveEntrance()
{
var windgenerator = CreateObjectAbove(WindGenerator, 40, 328);
windgenerator->SetObjectLayer(windgenerator);
var armory =CreateObjectAbove(Armory, 112, 328);
armory->SetObjectLayer(armory);
var workshop = CreateObjectAbove(ToolsWorkshop, 192, 328);
workshop->SetObjectLayer(workshop);
// Place a shovel for digging.
var shovel = CreateObjectAbove(Shovel, 200, 328);
shovel->SetR(Random(360));
return;
}
private func InitCaveMiddle()
{
// Make sure the brick overlaps the rock to blast.
DrawMaterialQuad("Brick", 432, 536, 472, 536, 472, 542, 432, 542, true);
// Some firestones on the way, to pick up.
//PlaceObjects(Firestone, 2 + Random(2), "Earth", 248, 440, 40, 40);
// Some mushrooms and ferns in the middle: left cave.
Fern->Place(2 + Random(2), Rectangle(0, 480, 56, 40));
Mushroom->Place(4 + Random(2), Rectangle(0, 480, 56, 40));
// Some mushrooms and ferns in the middle: middle cave.
Fern->Place(3 + Random(2), Rectangle(128, 464, 104, 80));
Mushroom->Place(6 + Random(2), Rectangle(128, 464, 104, 80));
// Some mushrooms and ferns in the middle: bottom cave.
Fern->Place(3 + Random(2), Rectangle(400, 580, 100, 64));
Mushroom->Place(6 + Random(2), Rectangle(400, 580, 100, 64));
// Seaweed in the two lakes.
Seaweed->Place(5, Rectangle(48, 400, 96, 32));
return;
}
private func InitCaveBottom()
{
PlaceObjects(Loam, 2 + Random(2), "Earth", 496, 592, 40, 24);
// Seaweed in the two lakes.
Seaweed->Place(5, Rectangle(128, 688, 88, 48));
Seaweed->Place(5, Rectangle(568, 688, 80, 48));
return;
}
private func InitCliffTop()
{
// Some trees and bushes on top of the cliff.
SproutBerryBush->Place(3 + Random(3), Rectangle(240, 160, 400, 120));
Flower->Place(10, Rectangle(240, 160, 400, 120));
// Berry bush on the right side of the cliff.
SproutBerryBush->Place(1, Rectangle(580, 310, 60, 60));
var bush = FindObject(Find_ID(SproutBerryBush), Sort_Distance(610, 340));
if (bush)
bush->CreateObject(Sproutberry);
return;
}
private func InitAcidLake()
{
// Ropebridge over the acid lake.
var post1 = CreateObjectAbove(Ropebridge_Post, 816, 528);
var post2 = CreateObjectAbove(Ropebridge_Post, 928, 528);
post2->SetObjDrawTransform(-1000, 0, 0, 0, 1000);
post2.Double->SetObjDrawTransform(-1000, 0, 0, 0, 1000);
var bridge = CreateObjectAbove(Ropebridge, 872, 528);
bridge->MakeBridge(post1, post2);
bridge->SetFragile();
// Make the acid lake bubbling a bit.
BoilingAcid->Place();
// An acid power plant on the right with some dead trees.
CreateObjectAbove(Tree_Coniferous_Burned, 754, 532)->DoCon(-30);
CreateObjectAbove(Tree_Coniferous_Burned, 792, 532)->DoCon(-10);
CreateObjectAbove(Tree_Coniferous_Burned, 942, 532)->DoCon(-35);
var engine = CreateObjectAbove(SteamEngine, 980, 528); // TODO: replace with the acid machine
engine->SetObjectLayer(engine);
return;
}
// Vegetation throughout the scenario.
private func InitVegetation()
{
PlaceGrass(85);
PlaceObjects(Firestone, 25 + Random(5), "Earth");
PlaceObjects(Loam, 15 + Random(5), "Earth");
return;
}
private func InitAnimals()
{
// The wipf as your friend, controlled by AI.
CreateObjectAbove(Wipf, 500, 536);
// Some butterflies as atmosphere.
for (var i = 0; i < 25; i++)
PlaceAnimal(Butterfly);
return;
}
/*-- Player Handling --*/
protected func InitializePlayer(int plr)
{
// Position player's clonk.
var clonk = GetCrew(plr, 0);
clonk->SetPosition(40, 318);
var effect = AddEffect("ClonkRestore", clonk, 100, 10);
effect.to_x = 40;
effect.to_y = 318;
// Add an effect to the clonk to track the goal.
AddEffect("TrackGoal", clonk, 100, 2);
// Standard player zoom for tutorials.
SetPlayerViewLock(plr, true);
SetPlayerZoomByViewRange(plr, 400, nil, PLRZOOM_Direct | PLRZOOM_Set);
// Create tutorial guide, add messages, show first.
guide = CreateObject(TutorialGuide, 0, 0, plr);
guide->AddGuideMessage("$MsgTutorialIntro$");
guide->ShowGuideMessage(0);
AddEffect("TutorialShovel", nil, 100, 5);
return;
}
/*-- Intro, Tutorial Goal & Outro --*/
global func FxTrackGoalTimer(object target, proplist effect, int time)
{
if (Inside(target->GetX(), 982, 1002) && Inside(target->GetY(), 504, 528))
{
if (FindObject(Find_ID(Wipf), Find_Distance(15, target->GetX(), target->GetY())))
{
AddEffect("GoalOutro", target, 100, 5);
return FX_Execute_Kill;
}
}
return FX_OK;
}
global func FxGoalOutroStart(object target, proplist effect, int temp)
{
if (temp)
return FX_OK;
// Show guide message congratulating.
guide->AddGuideMessage("$MsgTutorialCompleted$");
guide->ShowGuideMessage(11);
return FX_OK;
}
global func FxGoalOutroTimer(object target, proplist effect, int time)
{
if (time >= 54)
{
var goal = FindObject(Find_ID(Goal_Tutorial));
goal->Fulfill();
return FX_Execute_Kill;
}
return FX_OK;
}
global func FxGoalOutroStop(object target, proplist effect, int reason, bool temp)
{
if (temp)
return FX_OK;
}
/*-- Guide Messages --*/
global func FxTutorialShovelTimer()
{
var clonk = FindObject(Find_ID(Clonk), Find_InRect(120, 264, 64, 64));
if (clonk)
{
var plr = clonk->GetOwner();
var pick_up = GetPlayerControlAssignment(plr, CON_PickUp, true, true);
guide->AddGuideMessage(Format("$MsgTutorialShovel$", pick_up));
guide->ShowGuideMessage(1);
AddEffect("TutorialInventory", nil, 100, 5);
return FX_Execute_Kill;
}
return FX_OK;
}
global func FxTutorialInventoryTimer()
{
var clonk = FindObject(Find_ID(Clonk), Find_InRect(120, 264, 192, 64));
if (clonk)
{
var plr = clonk->GetOwner();
var shovel = FindObject(Find_ID(Shovel), Find_Container(clonk));
if (shovel)
{
var inv_hotkey_ids = [CON_Hotkey1, CON_Hotkey2, CON_Hotkey3, CON_Hotkey4, CON_Hotkey5];
var inv_hotkeys = "";
for (var inv_hotkey in inv_hotkey_ids)
inv_hotkeys = Format("%s[%s]", inv_hotkeys, GetPlayerControlAssignment(plr, inv_hotkey, true, true));
var inv_inv_scroll_up = GetPlayerControlAssignment(plr, CON_InventoryShiftForward, true, true);
var inv_inv_scroll_down = GetPlayerControlAssignment(plr, CON_InventoryShiftBackward, true, true);
var inv_scroll = Format("[%s][%s]", inv_inv_scroll_up, inv_inv_scroll_down);
guide->AddGuideMessage(Format("$MsgTutorialInventory$", inv_hotkeys, inv_scroll));
guide->ShowGuideMessage(2);
AddEffect("TutorialDigging", nil, 100, 5);
return FX_Execute_Kill;
}
}
return FX_OK;
}
global func FxTutorialDiggingTimer()
{
var clonk = FindObject(Find_OCF(OCF_CrewMember), Find_InRect(328, 304, 96, 64));
if (clonk)
{
var plr = clonk->GetOwner();
var shovel = FindObject(Find_ID(Shovel), Find_Container(clonk));
if (shovel)
{
var use = GetPlayerControlAssignment(plr, CON_Use, true, true);
guide->AddGuideMessage(Format("$MsgTutorialDigging$", use));
guide->ShowGuideMessage(3);
AddEffect("TutorialFirestones", nil, 100, 5);
return FX_Execute_Kill;
}
}
return FX_OK;
}
global func FxTutorialFirestonesTimer()
{
if (FindObject(Find_OCF(OCF_CrewMember), Find_InRect(288, 384, 24, 96)))
{
guide->AddGuideMessage("$MsgTutorialFirestones$");
guide->ShowGuideMessage(4);
AddEffect("TutorialWipfHole", nil, 100, 5);
return FX_Execute_Kill;
}
return FX_OK;
}
global func FxTutorialWipfHoleTimer()
{
var clonk = FindObject(Find_OCF(OCF_CrewMember), Find_InRect(368, 496, 72, 56));
if (clonk)
{
var plr = clonk->GetOwner();
var throw = GetPlayerControlAssignment(plr, CON_Throw, true, true);
guide->AddGuideMessage(Format("$MsgTutorialFoundWipf$", throw));
guide->ShowGuideMessage(5);
AddEffect("TutorialBlastedRock", nil, 100, 5);
return FX_Execute_Kill;
}
return FX_OK;
}
global func FxTutorialBlastedRockTimer()
{
var clonk = FindObject(Find_OCF(OCF_CrewMember), Find_InRect(468, 496, 72, 48));
if (clonk)
{
var plr = clonk->GetOwner();
var drop = GetPlayerControlAssignment(plr, CON_DropHotkey1, true, true);
guide->AddGuideMessage(Format("$MsgTutorialBlastedRock$", drop));
guide->ShowGuideMessage(6);
AddEffect("TutorialFedWipf", nil, 100, 5);
return FX_Execute_Kill;
}
return FX_OK;
}
global func FxTutorialFedWipfTimer()
{
var wipf = FindObject(Find_ID(Wipf));
if (wipf->HadFood())
{
guide->AddGuideMessage("$MsgTutorialFedWipf$");
guide->ShowGuideMessage(7);
AddEffect("TutorialDigOutLoam", nil, 100, 5);
return FX_Execute_Kill;
}
return FX_OK;
}
global func FxTutorialDigOutLoamTimer()
{
var clonk = FindObject(Find_OCF(OCF_CrewMember), Find_InRect(424, 600, 32, 64));
if (clonk)
{
var plr = clonk->GetOwner();
var use = GetPlayerControlAssignment(plr, CON_Use, true, true);
guide->AddGuideMessage(Format("$MsgTutorialDigOutLoam$", use));
guide->ShowGuideMessage(8);
AddEffect("TutorialFragileBridge", nil, 100, 5);
return FX_Execute_Kill;
}
return FX_OK;
}
global func FxTutorialFragileBridgeTimer()
{
var clonk = FindObject(Find_OCF(OCF_CrewMember), Find_InRect(744, 480, 80, 48));
if (clonk)
{
guide->AddGuideMessage("$MsgTutorialFragileBridge$");
guide->ShowGuideMessage(9);
// Stop the controls of the clonk for a few seconds.
DisablePlrControls(clonk->GetOwner());
clonk->SetComDir(COMD_Stop);
var effect = AddEffect("TutorialWaitForBridge", nil, 100, 5);
effect.plr = clonk->GetOwner();
return FX_Execute_Kill;
}
return FX_OK;
}
global func FxTutorialWaitForBridgeTimer(object target, proplist effect, int time)
{
if (time > 2 * 36)
{
guide->AddGuideMessage("$MsgTutorialMakeLoamBridge$");
guide->ShowGuideMessage(10);
// Start the controls of the clonk again.
EnablePlrControls(effect.plr);
return FX_Execute_Kill;
}
return FX_OK;
}
protected func OnGuideMessageShown(int plr, int index)
{
// Show the direction to move.
if (index == 0)
TutArrowShowPos(104, 312, 90);
// Show the shovel.
if (index == 1)
{
var shovel = FindObject(Find_ID(Shovel), Find_NoContainer());
if (shovel)
TutArrowShowTarget(shovel);
}
// Show the direction to dig.
if (index == 3)
TutArrowShowPos(366, 396, 225);
// Show the firestone material.
if (index == 4)
TutArrowShowPos(268, 456);
// Show the rock to blow up.
if (index == 5)
TutArrowShowPos(436, 520, 90);
// Show the clonks friend: the wipf.
if (index == 6)
TutArrowShowTarget(FindObject(Find_ID(Wipf)));
// Show to the way down to the settlement.
if (index == 7)
TutArrowShowPos(368, 592);
// Show the loam pieces to collect.
if (index == 8)
TutArrowShowPos(504, 614, 90);
// Show the fragile bridge.
if (index == 9)
TutArrowShowPos(848, 520);
return;
}
protected func OnGuideMessageRemoved(int plr, int index)
{
TutArrowClear();
return;
}
/*-- Clonk restoring --*/
global func FxClonkRestoreTimer(object target, proplist effect, int time)
{
// Respawn clonk to new location if reached certain position.
if (FindObject(Find_OCF(OCF_CrewMember), Find_InRect(266, 382, 80, 100)))
{
effect.to_x = 304;
effect.to_y = 444;
}
if (FindObject(Find_OCF(OCF_CrewMember), Find_InRect(408, 574, 60, 58)))
{
effect.to_x = 428;
effect.to_y = 624;
}
if (FindObject(Find_OCF(OCF_CrewMember), Find_InRect(744, 464, 72, 64)))
{
effect.to_x = 776;
effect.to_y = 518;
}
return FX_OK;
}
// Relaunches the clonk, from death or removal.
global func FxClonkRestoreStop(object target, effect, int reason, bool temporary)
{
if (reason == 3 || reason == 4)
{
var restorer = CreateObject(ObjectRestorer, 0, 0, NO_OWNER);
var x = BoundBy(target->GetX(), 0, LandscapeWidth());
var y = BoundBy(target->GetY(), 0, LandscapeHeight());
restorer->SetPosition(x, y);
var to_x = effect.to_x;
var to_y = effect.to_y;
// Respawn new clonk.
var plr = target->GetOwner();
var clonk = CreateObject(Clonk, 0, 0, plr);
clonk->GrabObjectInfo(target);
SetCursor(plr, clonk);
clonk->DoEnergy(100000);
restorer->SetRestoreObject(clonk, nil, to_x, to_y, 0, "ClonkRestore");
}
return FX_OK;
}

View File

@ -0,0 +1,23 @@
# Goal Description
MsgGoalName=Free your Wipf
MsgGoalDescription=Locate your little friend, free him and take him to the next settlement.
# Dialogue options
MsgNextTutorial=&Next tutorial
MsgNextTutorialDesc=Start the next tutorial scenario.
MsgRepeatRound=&Repeat this round
MsgRepeatRoundDesc=Restart this scenario.
# Tutorial messages
MsgTutorialIntro=It seems your little friend is lost again, he's quite a character! Wipfs tend to spend quite some time underground cause of their craving for digging, so you might find him there. For now just proceed to the right.
MsgTutorialShovel=There is a shovel over there! Clonks need equipment to perform certain tasks, the shovel is used for digging. Pick up the shovel by standing in front of it and by pressing [%s].
MsgTutorialInventory=Now the shovel is in your inventory, the five slots at the bottom of the screen. The item you have selected is highlighted and can be used. To change the item selection press the corresponding number key (%s) or use the %s to cycle through the inventory.
MsgTutorialDigging=Now that you are holding shovel, you better use it. Hold the [%s] to use the item currently selected. Select the shovel and you can start digging in the direction you are pointing towards.
MsgTutorialFirestones=Watch out! The reddish material ahead is dangerous, if you dig through this material firestones will appear. These are fragile and highly explosive, luckily the clonk picks them up automatically when they are in range. Be sure to pick up a couple, they might come in handy.
MsgTutorialFoundWipf=Almost found your wipf, but a patch of rock is in the way. Rock can not be dug away and must be blown. Throw some firestones on the rock, but keep your distance! Click the [%s] in the direction you want to throw.
MsgTutorialBlastedRock=Well done, you blasted the rock and found your friend! He seems exhausted, bring him some food, for example the mushrooms in the caves around. To drop an item press [%s] plus the inventory number key while standing close to the Wipf.
MsgTutorialFedWipf=That has done him good! Just follow your little friend, he seems to be attracted by something.
MsgTutorialDigOutLoam=This way! These orange objects ahead are pieces of loam, dig them out and collect a few. Loam can be used to build bridges out of earth, hold the [%s] to construct a bridge in the direction of the mouse cursor.
MsgTutorialFragileBridge=Wait a second... That bridge looks highly fragile, and below there is acid, which is very dangerous. You should let your wipf go ahead to probe the bridge since he is much lighter.
MsgTutorialMakeLoamBridge=I told you so, it was fragile after all, luckily your friend made it. Use the pieces of loam to construct a bridge to safely pass the acid below and get to your furry friend.
MsgTutorialCompleted=Well done! Let's proceed to the next tutorial.

View File

@ -0,0 +1,23 @@
# Goal Description
MsgGoalName=Free your Wipf
MsgGoalDescription=Locate your little friend, free him and take him to the next settlement.
# Dialogue options
MsgNextTutorial=&Next tutorial
MsgNextTutorialDesc=Start the next tutorial scenario.
MsgRepeatRound=&Repeat this round
MsgRepeatRoundDesc=Restart this scenario.
# Tutorial messages
MsgTutorialIntro=It seems your little friend is lost again, he's quite a character! Wipfs tend to spend quite some time underground cause of their craving for digging, so you might find him there. For now just proceed to the right.
MsgTutorialShovel=There is a shovel over there! Clonks need equipment to perform certain tasks, the shovel is used for digging. Pick up the shovel by standing in front of it and by pressing [%s].
MsgTutorialInventory=Now the shovel is in your inventory, the five slots at the bottom of the screen. The item you have selected is highlighted and can be used. To change the item selection press the corresponding number key (%s) or use the %s to cycle through the inventory.
MsgTutorialDigging=Now that you are holding shovel, you better use it. Hold the [%s] to use the item currently selected. Select the shovel and you can start digging in the direction you are pointing towards.
MsgTutorialFirestones=Watch out! The reddish material ahead is dangerous, if you dig through this material firestones will appear. These are fragile and highly explosive, luckily the clonk picks them up automatically when they are in range. Be sure to pick up a couple, they might come in handy.
MsgTutorialFoundWipf=Almost found your wipf, but a patch of rock is in the way. Rock can not be dug away and must be blown. Throw some firestones on the rock, but keep your distance! Click the [%s] in the direction you want to throw.
MsgTutorialBlastedRock=Well done, you blasted the rock and found your friend! He seems exhausted, bring him some food, for example the mushrooms in the caves around. To drop an item press [%s] plus the inventory number key while standing close to the Wipf.
MsgTutorialFedWipf=That has done him good! Just follow your little friend, he seems to be attracted by something.
MsgTutorialDigOutLoam=This way! These orange objects ahead are pieces of loam, dig them out and collect a few. Loam can be used to build bridges out of earth, hold the [%s] to construct a bridge in the direction of the mouse cursor.
MsgTutorialFragileBridge=Wait a second... That bridge looks highly fragile, and below there is acid, which is very dangerous. You should let your wipf go ahead to probe the bridge since he is much lighter.
MsgTutorialMakeLoamBridge=I told you so, it was fragile after all, luckily your friend made it. Use the pieces of loam to construct a bridge to safely pass the acid below and get to your furry friend.
MsgTutorialCompleted=Well done! Let's proceed to the next tutorial.

View File

@ -0,0 +1,39 @@
// Make's the wipf turn into rainbow colors after eating a berry.
#appendto Wipf
protected func RejectCollect(id object_id)
{
if (object_id == Sproutberry)
{
// Add some stars effect to the clonk indicating the easteregg.
CreateParticle("StarSpark", PV_Random(-3, 3), PV_Random(-14, -10), PV_Random(-5, 5), PV_Random(-8, 0), 25, Particles_Magic(), 20);
AddEffect("IntBreathBubbles", this, 100, 5, this);
}
return _inherited(...);
}
protected func FxIntBreathBubblesTimer(object target, proplist effect, int time)
{
if (!Random(4))
return 1;
var bubble =
{
CollisionVertex = 500,
OnCollision = PC_Die(),
ForceY = PV_Gravity(-100),
ForceX = PV_Wind(100),
DampingX = 900, DampingY = 900,
Alpha = PV_Linear(255, 0),
R = 255, G = 20, B = 147,
Size = 3,
Phase = 0
};
CreateParticle("SphereSpark", 3 * GetDir(), -2, PV_Random(-2, 2), PV_Random(-8, 0), 25, bubble, 1);
return 1;
}

View File

@ -0,0 +1,60 @@
// Artificial intelligence for the wipf.
#appendto Wipf
local had_food = false;
protected func Initialize()
{
_inherited(...);
RemoveEffect("Activity", this);
AddEffect("TutorialWipf", this, 1, 5, this);
return;
}
public func HadFood() { return had_food; }
protected func FxTutorialWipfStart(object target, proplist effect, int temp)
{
if (temp)
return;
effect.Sequence = "WaitForFood";
return FX_OK;
}
protected func FxTutorialWipfTimer(object target, proplist effect, int time)
{
// Wait for some food to appear.
var food = FindObject(Find_Func("NutritionalValue"), Find_Distance(16), Find_NoContainer());
if (effect.Sequence == "WaitForFood" && food)
{
Collect(food, true);
had_food = true;
//SetCommand("Follow", FindObject(Find_OCF(OCF_CrewMember)));
effect.Sequence = "MoveToLoam";
}
// Move down to the loam.
if (effect.Sequence == "MoveToLoam" )
{
SetCommand("MoveTo", nil, 488, 620);
if (Inside(GetX(), 472, 520) && Inside(GetY(), 600, 632) && PathFree(484, 616, 544, 602))
effect.Sequence = "MoveToBridge";
}
// Move to the bridge.
if (effect.Sequence == "MoveToBridge")
{
SetCommand("MoveTo", nil, 796, 524);
var clonk = FindObject(Find_OCF(OCF_CrewMember), Find_InRect(AbsX(744), AbsY(480), 80, 48));
if (Inside(GetX(), 760, 816) && Inside(GetY(), 496, 528) && clonk)
effect.Sequence = "MoveToSettlement";
}
// Move to settlement.
if (effect.Sequence == "MoveToSettlement")
{
SetCommand("MoveTo", nil, 992, 524);
}
return 1;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

View File

@ -0,0 +1,2 @@
DE:Barrieren Bomben
US:Bombing Barriers