diff options
| author | Jan <> | 2015-02-02 17:55:29 +0100 |
|---|---|---|
| committer | Jan <_> | 2015-07-10 17:49:45 +0200 |
| commit | 32a9632fbca3dd7a88bd3154b84a3773af39c276 (patch) | |
| tree | a226b9404844a73c7229e9d13db993c86b5be2c1 /TemplePushing.c4s/Misc.c4d | |
| parent | 40fb3e5d61c44886b06d839a35adb0c11a5f918f (diff) | |
| download | tempelschubsen-32a9632fbca3dd7a88bd3154b84a3773af39c276.tar.gz tempelschubsen-32a9632fbca3dd7a88bd3154b84a3773af39c276.zip | |
TemplePush v6.1.7601.18409.c4s
Diffstat (limited to 'TemplePushing.c4s/Misc.c4d')
37 files changed, 520 insertions, 0 deletions
diff --git a/TemplePushing.c4s/Misc.c4d/Brick.c4d/ActMap.txt b/TemplePushing.c4s/Misc.c4d/Brick.c4d/ActMap.txt new file mode 100644 index 0000000..03f7ca9 --- /dev/null +++ b/TemplePushing.c4s/Misc.c4d/Brick.c4d/ActMap.txt @@ -0,0 +1,6 @@ +[Action] +Name=Flying +Procedure=FLOAT +Directions=2 +Length=2 +Facet=0,0,20,20 diff --git a/TemplePushing.c4s/Misc.c4d/Brick.c4d/DefCore.txt b/TemplePushing.c4s/Misc.c4d/Brick.c4d/DefCore.txt new file mode 100644 index 0000000..bef6342 --- /dev/null +++ b/TemplePushing.c4s/Misc.c4d/Brick.c4d/DefCore.txt @@ -0,0 +1,26 @@ +[DefCore] +id=BRK2 +Name=BigBrick +Version=4,9,5 +Category=4 +MaxUserSelect=0 +Width=20 +Height=20 +Offset=-10,-10 +Value=50 +Mass=100 +Components=ROCK=8; +ContactCalls=1 +Picture=0,0,20,20 +Vertices=9 +VertexX=0, -11,-11, 10, 10,-12, 0, 11, 0 +VertexY=14,-11, 11,-11, 11, 0,-12, 0, 11 +VertexCNAT=127 +SolidMask=0,0,20,20 +VertexFriction=10000,10000,10000,10000,10000,10000,10000,10000,10000 +ColorByMaterial=Brick +TimerCall=CheckHit +Timer=1 + +[Physical] +Float=200
\ No newline at end of file diff --git a/TemplePushing.c4s/Misc.c4d/Brick.c4d/DescDE.txt b/TemplePushing.c4s/Misc.c4d/Brick.c4d/DescDE.txt new file mode 100644 index 0000000..c69e382 --- /dev/null +++ b/TemplePushing.c4s/Misc.c4d/Brick.c4d/DescDE.txt @@ -0,0 +1 @@ +Ein "Fahrziegel"?
\ No newline at end of file diff --git a/TemplePushing.c4s/Misc.c4d/Brick.c4d/DescUS.txt b/TemplePushing.c4s/Misc.c4d/Brick.c4d/DescUS.txt new file mode 100644 index 0000000..7339045 --- /dev/null +++ b/TemplePushing.c4s/Misc.c4d/Brick.c4d/DescUS.txt @@ -0,0 +1 @@ +A brick as an object.
\ No newline at end of file diff --git a/TemplePushing.c4s/Misc.c4d/Brick.c4d/Graphics.png b/TemplePushing.c4s/Misc.c4d/Brick.c4d/Graphics.png Binary files differnew file mode 100644 index 0000000..1b531ea --- /dev/null +++ b/TemplePushing.c4s/Misc.c4d/Brick.c4d/Graphics.png diff --git a/TemplePushing.c4s/Misc.c4d/Brick.c4d/Names.txt b/TemplePushing.c4s/Misc.c4d/Brick.c4d/Names.txt new file mode 100644 index 0000000..b311575 --- /dev/null +++ b/TemplePushing.c4s/Misc.c4d/Brick.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Ziegel +US:Brick
\ No newline at end of file diff --git a/TemplePushing.c4s/Misc.c4d/Brick.c4d/Script.c b/TemplePushing.c4s/Misc.c4d/Brick.c4d/Script.c new file mode 100644 index 0000000..4a70dd2 --- /dev/null +++ b/TemplePushing.c4s/Misc.c4d/Brick.c4d/Script.c @@ -0,0 +1,29 @@ +/*-- Brick --*/ + +#strict 2 + +local yMin, yMax; + +protected func Initialize() +{ + SetAction("Flying"); + SetPhase(Random(2)); + SetDir(Random(2)); + ContactTop(); + yMin = 100; + yMax = 650; +} + +protected func ContactBottom() { SetYDir(-10); } +protected func ContactTop() { SetYDir(10); } + +func CheckHit() +{ + if (GetXDir() == 0 && GetYDir() == 0) + { + SetXDir(RandomX(-100, 100)); + SetYDir(RandomX(-100, 100)); + } + if (GetY() >= yMax) ContactBottom(); + if (GetY() <= yMin) ContactTop(); +} diff --git a/TemplePushing.c4s/Misc.c4d/SetupMenu.c4d/DefCore.txt b/TemplePushing.c4s/Misc.c4d/SetupMenu.c4d/DefCore.txt new file mode 100644 index 0000000..01a88ad --- /dev/null +++ b/TemplePushing.c4s/Misc.c4d/SetupMenu.c4d/DefCore.txt @@ -0,0 +1,10 @@ +[DefCore] +id=SPMU +Name=Setup Menu +Version=4,9,5 +Category=C4D_StaticBack +Width=1 +Height=1 +Picture=0,0,64,64 +Timer=1 +TimerCall=KeepMenuOpen diff --git a/TemplePushing.c4s/Misc.c4d/SetupMenu.c4d/DescDE.txt b/TemplePushing.c4s/Misc.c4d/SetupMenu.c4d/DescDE.txt new file mode 100644 index 0000000..aa1c8e5 --- /dev/null +++ b/TemplePushing.c4s/Misc.c4d/SetupMenu.c4d/DescDE.txt @@ -0,0 +1 @@ +Einstellungsmenü das beim Start des Szenarios angezeigt wird.
\ No newline at end of file diff --git a/TemplePushing.c4s/Misc.c4d/SetupMenu.c4d/DescUS.txt b/TemplePushing.c4s/Misc.c4d/SetupMenu.c4d/DescUS.txt new file mode 100644 index 0000000..e694245 --- /dev/null +++ b/TemplePushing.c4s/Misc.c4d/SetupMenu.c4d/DescUS.txt @@ -0,0 +1 @@ +Setup menu shown at the beginning of the scenario.
\ No newline at end of file diff --git a/TemplePushing.c4s/Misc.c4d/SetupMenu.c4d/Graphics.png b/TemplePushing.c4s/Misc.c4d/SetupMenu.c4d/Graphics.png Binary files differnew file mode 100644 index 0000000..638c255 --- /dev/null +++ b/TemplePushing.c4s/Misc.c4d/SetupMenu.c4d/Graphics.png diff --git a/TemplePushing.c4s/Misc.c4d/SetupMenu.c4d/Names.txt b/TemplePushing.c4s/Misc.c4d/SetupMenu.c4d/Names.txt new file mode 100644 index 0000000..568f093 --- /dev/null +++ b/TemplePushing.c4s/Misc.c4d/SetupMenu.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Einstellungsmenü +US:Setup Menu
\ No newline at end of file diff --git a/TemplePushing.c4s/Misc.c4d/SetupMenu.c4d/Script.c b/TemplePushing.c4s/Misc.c4d/SetupMenu.c4d/Script.c new file mode 100644 index 0000000..0577e73 --- /dev/null +++ b/TemplePushing.c4s/Misc.c4d/SetupMenu.c4d/Script.c @@ -0,0 +1,243 @@ +/*-- Setup Menu --*/ + +#strict 2 + +static const + SETTING_Deathmatch = 0, SETTING_Extinguisher = 1, SETTING_FriendlyPushing = 2, SETTING_RotateInJump = 3, + SETTING_RelaunchesInc = 4, SETTING_RelaunchesDec = 5, + SETTING_DeathmatchScoreInc = 6, SETTING_DeathmatchScoreDec = 7, + SETTING_Ambience = 8; + +local Sections, Modes; +local clonk, setupPlayer; + +// Selected values +local section, mode; +local extinguisherEnabled, friendlyPushingEnabled, rotateInJumpEnabled; +local ambienceEnabled; +local numRelaunches; +local deathmatchEnabled, deathmatchWinScore; + +protected func Initialize() +{ + Sections = []; + for (var i = 0, def; def = GetDefinition(i, C4D_StaticBack); ++i) + { + if (DefinitionCall(def, "SectionName")) Sections[GetLength(Sections)] = def; + } + section = Sections[0]; + + Modes = [ + [MODE_Classic, "$ModeClassic$", ROCK], + [MODE_SuddenDeath, "$ModeSuddenDeath$", SDDT], + [MODE_Magic, "$ModeMagic$", SMGC], + [MODE_Apocalyptic, "$ModeApocalyptic$", APCE]]; +} + +private func ShowSetup() +{ + ShowMessage(); + ShowSectionMenu(); +} + +private func ShowSectionMenu() +{ + CreateMenu(GetID(), clonk, 0, C4MN_Extra_None, 0, 0, C4MN_Style_Context); + + for (var i = 0; i < GetLength(Sections); ++i) + { + clonk->AddMenuItem(GetName(0, Sections[i]), Format("SelectSection(%i)", Sections[i]), Sections[i]); + CheckPreselect(Sections[i] == section, i); + } +} + +private func SelectSection(id selectedSection) +{ + section = selectedSection; + ShowMessage(); + + ShowModeMenu(); +} + +private func ShowModeMenu() +{ + CreateMenu(GetID(), clonk, 0, C4MN_Extra_None, 0, 0, C4MN_Style_Context); + + var menuItemIndex = 0; + for (var m in Modes) + { + clonk->AddMenuItem(m[1], Format("SelectMode(%d)", m[0]), m[2]); + CheckPreselect(m[0] == mode, menuItemIndex++); + } + + clonk->AddMenuItem("$Back$", "ShowSectionMenu()", ROCK); +} + +private func SelectMode(int selectedMode) +{ + mode = selectedMode; + if (mode == MODE_SuddenDeath) deathmatchEnabled = false; + ShowMessage(); + + ShowSettingsMenu(); +} + +private func ShowSettingsMenu(bool preselect, int selectedSetting) +{ + CreateMenu(GetID(), clonk, 0, C4MN_Extra_None, 0, 0, C4MN_Style_Context); + + var menuItemIndex = 0; + + // Deathmatch entry + if (mode != MODE_SuddenDeath) + { + AddOptionMenuItem(GetName(0, DTHM), deathmatchEnabled, "SelectSetting(SETTING_Deathmatch)", DTHM); + CheckPreselect(preselect && selectedSetting == SETTING_Deathmatch, menuItemIndex++); + } + + // Extinguisher entry + AddOptionMenuItem(GetName(0, _ETG), extinguisherEnabled, "SelectSetting(SETTING_Extinguisher)", _ETG); + CheckPreselect(preselect && selectedSetting == SETTING_Extinguisher, menuItemIndex++); + + // "Friendly Pushing" entry + AddOptionMenuItem(GetName(0, FYPG), friendlyPushingEnabled, "SelectSetting(SETTING_FriendlyPushing)", FYPG); + CheckPreselect(preselect && selectedSetting == SETTING_FriendlyPushing, menuItemIndex++); + + // "Turn in jump" entry + AddOptionMenuItem(GetName(0, RIJP), rotateInJumpEnabled, "SelectSetting(SETTING_RotateInJump)", RIJP); + CheckPreselect(preselect && selectedSetting == SETTING_RotateInJump, menuItemIndex++); + + // Ambience entry + AddOptionMenuItem("$Ambience$", ambienceEnabled, "SelectSetting(SETTING_Ambience)", SABC); + CheckPreselect(preselect && selectedSetting == SETTING_Ambience, menuItemIndex++); + + if (!deathmatchEnabled) + { + clonk->AddMenuItem("$Relaunches$ +", "SelectSetting(SETTING_RelaunchesInc)", SKUL); + CheckPreselect(preselect && selectedSetting == SETTING_RelaunchesInc, menuItemIndex++); + clonk->AddMenuItem("$Relaunches$ -", "SelectSetting(SETTING_RelaunchesDec)", SKUL); + CheckPreselect(preselect && selectedSetting == SETTING_RelaunchesDec, menuItemIndex++); + } + else + { + clonk->AddMenuItem("$Kills$ +", "SelectSetting(SETTING_DeathmatchScoreInc)", SWOR); + CheckPreselect(preselect && selectedSetting == SETTING_DeathmatchScoreInc, menuItemIndex++); + clonk->AddMenuItem("$Kills$ -", "SelectSetting(SETTING_DeathmatchScoreDec)", SWOR); + CheckPreselect(preselect && selectedSetting == SETTING_DeathmatchScoreDec, menuItemIndex++); + } + + clonk->AddMenuItem("$Done$", "SetupDone()", GOLD); + CheckPreselect(!preselect, menuItemIndex++); + clonk->AddMenuItem("$Back$", "ShowModeMenu()", ROCK); +} + +private func SelectSetting(int selectedSetting) +{ + if (selectedSetting == SETTING_Deathmatch) + { + deathmatchEnabled = !deathmatchEnabled; + } + else if (selectedSetting == SETTING_Extinguisher) + { + extinguisherEnabled = !extinguisherEnabled; + } + else if (selectedSetting == SETTING_FriendlyPushing) + { + friendlyPushingEnabled = !friendlyPushingEnabled; + } + else if (selectedSetting == SETTING_RotateInJump) + { + rotateInJumpEnabled = !rotateInJumpEnabled; + } + else if (selectedSetting == SETTING_Ambience) + { + ambienceEnabled = !ambienceEnabled; + } + else if (selectedSetting == SETTING_RelaunchesInc) + { + ++numRelaunches; + } + else if (selectedSetting == SETTING_RelaunchesDec) + { + numRelaunches = Max(numRelaunches - 1, 0); + } + else if (selectedSetting == SETTING_DeathmatchScoreInc) + { + ++deathmatchWinScore; + } + else if (selectedSetting == SETTING_DeathmatchScoreDec) + { + deathmatchWinScore = Max(deathmatchWinScore - 1, 1); + } + + ShowMessage(); + + ShowSettingsMenu(true, selectedSetting); +} + +private func SetupDone() +{ + ShowMessage(); + GameCall("StartGame", this, GetMessage()); +} + +private func AddOptionMenuItem(string caption, bool enabled, string command, id idItem) +{ + clonk->AddMenuItem(IIf(enabled, caption, Format("<c a0a0a0>%s</c>", caption)), command, idItem); +} + +private func CheckPreselect(bool preselect, int menuItemIndex) +{ + if (preselect) clonk->SelectMenuItem(menuItemIndex); +} + +private func KeepMenuOpen() +{ + // Find new player? + if (!GetPlayerID(setupPlayer)) + { + clonk = 0; + if (GetPlayerCount() == 0) return; + setupPlayer = GetPlayerByIndex(0); + } + + // Find clonk + if (!clonk || !clonk->GetAlive()) clonk = GetCrew(setupPlayer); + + // (Re)open menu + if (clonk && !clonk->GetMenu()) ShowSetup(); +} + +private func ShowMessage() { Message("@%s", 0, GetMessage()); } + +private func GetMessage() +{ + var msgSection = Format("$Landscape$: %s", GetName(0, section)); + + var msgMode; + for (var m in Modes) + { + if (m[0] == mode) + { + msgMode = Format("$Mode$: {{%i}} %s", m[2], m[1]); + break; + } + } + + var msgWinScore; + if (!deathmatchEnabled) + { + msgWinScore = Format("{{SKUL}} $Relaunches$: %d", numRelaunches); + } + else + { + msgWinScore = Format("{{SWOR}} %s: %d $Kills$", GetName(0, DTHM), deathmatchWinScore); + } + + var msgExtinguisher = Format("{{_ETG}} %s: %s", GetName(0, _ETG), IIf(extinguisherEnabled, "$Enabled$", "$Disabled$")); + var msgFriendlyPushing = Format("{{FYPG}} %s: %s", GetName(0, FYPG), IIf(friendlyPushingEnabled, "$Enabled$", "$Disabled$")); + var msgRotateInJump = Format("{{RIJP}} %s: %s", GetName(0, RIJP), IIf(rotateInJumpEnabled, "$Enabled$", "$Disabled$")); + var msgAmbience = Format("{{SABC}} $Ambience$: %s", IIf(ambienceEnabled, "$Enabled$", "$Disabled$")); + + return Format("%s|%s|%s|%s|%s|%s|%s", msgSection, msgMode, msgWinScore, msgExtinguisher, msgFriendlyPushing, msgRotateInJump, msgAmbience); +}
\ No newline at end of file diff --git a/TemplePushing.c4s/Misc.c4d/SetupMenu.c4d/StringTblDE.txt b/TemplePushing.c4s/Misc.c4d/SetupMenu.c4d/StringTblDE.txt new file mode 100644 index 0000000..bd28a61 --- /dev/null +++ b/TemplePushing.c4s/Misc.c4d/SetupMenu.c4d/StringTblDE.txt @@ -0,0 +1,14 @@ +ModeClassic=Klassisches Schubsen +ModeSuddenDeath=<c ffff00>Sudden Death</c> +ModeMagic=<c 0000ff>Magisches Schubsen</c> +ModeApocalyptic=<c ff0000>Apokalyptisches Schubsen</c> +Back=Zurück +Done=Fertig +Relaunches=Relaunches +Kills=Kills +SectionClassic=Klassisch +Landscape=Landschaft +Mode=Modus +Enabled=Aktiviert +Disabled=Deaktiviert +Ambience=Ambiente diff --git a/TemplePushing.c4s/Misc.c4d/SetupMenu.c4d/StringTblUS.txt b/TemplePushing.c4s/Misc.c4d/SetupMenu.c4d/StringTblUS.txt new file mode 100644 index 0000000..cd1f9c1 --- /dev/null +++ b/TemplePushing.c4s/Misc.c4d/SetupMenu.c4d/StringTblUS.txt @@ -0,0 +1,14 @@ +ModeClassic=Classic Pushing +ModeSuddenDeath=<c ffff00>Sudden Death</c> +ModeMagic=<c 0000ff>Magical Pushing</c> +ModeApocalyptic=<c ff0000>Apocalyptical Pushing</c> +Back=Back +Done=Done +Relaunches=Relaunches +Kills=Kills +SectionClassic=Classic +Landscape=Landscape +Mode=Mode +Enabled=Enabled +Disabled=Disabled +Ambience=Ambience diff --git a/TemplePushing.c4s/Misc.c4d/SpawnPointSpawner.c4d/DefCore.txt b/TemplePushing.c4s/Misc.c4d/SpawnPointSpawner.c4d/DefCore.txt new file mode 100644 index 0000000..76d56e6 --- /dev/null +++ b/TemplePushing.c4s/Misc.c4d/SpawnPointSpawner.c4d/DefCore.txt @@ -0,0 +1,8 @@ +[DefCore] +id=SPSR +Version=4,9,8 +Name=SpawnPointSpawner +Category=C4D_StaticBack +Width=1 +Height=1 +Picture=0,0,64,64 diff --git a/TemplePushing.c4s/Misc.c4d/SpawnPointSpawner.c4d/DescDE.txt b/TemplePushing.c4s/Misc.c4d/SpawnPointSpawner.c4d/DescDE.txt new file mode 100644 index 0000000..960aedf --- /dev/null +++ b/TemplePushing.c4s/Misc.c4d/SpawnPointSpawner.c4d/DescDE.txt @@ -0,0 +1 @@ +Im Spiel finden sich Spawn Points, die als sicherer Nachschub an Waffen und Tränken dienen.
\ No newline at end of file diff --git a/TemplePushing.c4s/Misc.c4d/SpawnPointSpawner.c4d/DescUS.txt b/TemplePushing.c4s/Misc.c4d/SpawnPointSpawner.c4d/DescUS.txt new file mode 100644 index 0000000..6719be2 --- /dev/null +++ b/TemplePushing.c4s/Misc.c4d/SpawnPointSpawner.c4d/DescUS.txt @@ -0,0 +1 @@ +Creates some spawn points in the game which are creating weapons and potions.
\ No newline at end of file diff --git a/TemplePushing.c4s/Misc.c4d/SpawnPointSpawner.c4d/Graphics.png b/TemplePushing.c4s/Misc.c4d/SpawnPointSpawner.c4d/Graphics.png Binary files differnew file mode 100644 index 0000000..1543a79 --- /dev/null +++ b/TemplePushing.c4s/Misc.c4d/SpawnPointSpawner.c4d/Graphics.png diff --git a/TemplePushing.c4s/Misc.c4d/SpawnPointSpawner.c4d/Names.txt b/TemplePushing.c4s/Misc.c4d/SpawnPointSpawner.c4d/Names.txt new file mode 100644 index 0000000..f74bd88 --- /dev/null +++ b/TemplePushing.c4s/Misc.c4d/SpawnPointSpawner.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Spawn Point Spawner +US:Spawn Point Spawner
\ No newline at end of file diff --git a/TemplePushing.c4s/Misc.c4d/SpawnPointSpawner.c4d/Script.c b/TemplePushing.c4s/Misc.c4d/SpawnPointSpawner.c4d/Script.c new file mode 100644 index 0000000..380ee86 --- /dev/null +++ b/TemplePushing.c4s/Misc.c4d/SpawnPointSpawner.c4d/Script.c @@ -0,0 +1,57 @@ +/*-- Spawn Point Spawner --*/ + +#strict 2 + +local locations, definitions, spawnInterval; +local sumProbability; +local gamma; + +public func CreateSpawnPoints() +{ + for (var pos in locations) + { + var spawnpoint = CreateObject(SNPT, pos[0], pos[1], NO_OWNER); + if (gamma) spawnpoint->SetGamma(gamma[0], gamma[1], gamma[2]); + spawnpoint->Enable(this); + } +} + +// [[x1, y1], [x2, y2], ...] +public func SetLocations(array locations) +{ + LocalN("locations") = locations; +} + +// [[FLNT, 50], [SFLN, 20], ...] +public func SetDefinitions(array definitions) +{ + LocalN("definitions") = definitions; + + sumProbability = 0; + for (var def in definitions) + { + sumProbability += def[1]; + } +} + +public func SetSpawnpointGamma(int color1, int color2, int color3) +{ + gamma = [color1, color2, color3]; +} + +public func GetSpawnInterval() { return spawnInterval; } + +public func SetSpawnInterval(int spawnInterval) +{ + LocalN("spawnInterval") = spawnInterval; +} + +public func GetRandomDefinition() +{ + var rnd = Random(sumProbability); + for (var def in definitions) + { + rnd -= def[1]; + if (rnd < 0) return def[0]; + } +} diff --git a/TemplePushing.c4s/Misc.c4d/SpawnPointSpawner.c4d/SpawnPoint.c4d/DefCore.txt b/TemplePushing.c4s/Misc.c4d/SpawnPointSpawner.c4d/SpawnPoint.c4d/DefCore.txt new file mode 100644 index 0000000..b977367 --- /dev/null +++ b/TemplePushing.c4s/Misc.c4d/SpawnPointSpawner.c4d/SpawnPoint.c4d/DefCore.txt @@ -0,0 +1,12 @@ +[DefCore] +id=SNPT +Name=SpawnPoint +Version=4,9,5 +Category=C4D_StaticBack|C4D_Foreground|C4D_MouseIgnore +Width=10 +Height=10 +Offset=-5,-5 +Picture=0,0,10,10 +Timer=5 +TimerCall=Timer +Collectible=1 diff --git a/TemplePushing.c4s/Misc.c4d/SpawnPointSpawner.c4d/SpawnPoint.c4d/DescDE.txt b/TemplePushing.c4s/Misc.c4d/SpawnPointSpawner.c4d/SpawnPoint.c4d/DescDE.txt new file mode 100644 index 0000000..b469ce9 --- /dev/null +++ b/TemplePushing.c4s/Misc.c4d/SpawnPointSpawner.c4d/SpawnPoint.c4d/DescDE.txt @@ -0,0 +1 @@ +Lässt Gegenstände als Nachschub erscheinen.
\ No newline at end of file diff --git a/TemplePushing.c4s/Misc.c4d/SpawnPointSpawner.c4d/SpawnPoint.c4d/DescUS.txt b/TemplePushing.c4s/Misc.c4d/SpawnPointSpawner.c4d/SpawnPoint.c4d/DescUS.txt new file mode 100644 index 0000000..3308b95 --- /dev/null +++ b/TemplePushing.c4s/Misc.c4d/SpawnPointSpawner.c4d/SpawnPoint.c4d/DescUS.txt @@ -0,0 +1 @@ +Spawns objects.
\ No newline at end of file diff --git a/TemplePushing.c4s/Misc.c4d/SpawnPointSpawner.c4d/SpawnPoint.c4d/Graphics.png b/TemplePushing.c4s/Misc.c4d/SpawnPointSpawner.c4d/SpawnPoint.c4d/Graphics.png Binary files differnew file mode 100644 index 0000000..4f75bf2 --- /dev/null +++ b/TemplePushing.c4s/Misc.c4d/SpawnPointSpawner.c4d/SpawnPoint.c4d/Graphics.png diff --git a/TemplePushing.c4s/Misc.c4d/SpawnPointSpawner.c4d/SpawnPoint.c4d/Names.txt b/TemplePushing.c4s/Misc.c4d/SpawnPointSpawner.c4d/SpawnPoint.c4d/Names.txt new file mode 100644 index 0000000..1315255 --- /dev/null +++ b/TemplePushing.c4s/Misc.c4d/SpawnPointSpawner.c4d/SpawnPoint.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Spawn Point +US:Spawn Point
\ No newline at end of file diff --git a/TemplePushing.c4s/Misc.c4d/SpawnPointSpawner.c4d/SpawnPoint.c4d/Script.c b/TemplePushing.c4s/Misc.c4d/SpawnPointSpawner.c4d/SpawnPoint.c4d/Script.c new file mode 100644 index 0000000..def8ef0 --- /dev/null +++ b/TemplePushing.c4s/Misc.c4d/SpawnPointSpawner.c4d/SpawnPoint.c4d/Script.c @@ -0,0 +1,57 @@ +/*-- Spawnpoint --*/ + +#strict 2 + +local spawner; +local framesUntilRespawn; +local angle; + +public func Enable(object spawner) +{ + LocalN("spawner") = spawner; +} + +private func SpawnObject() +{ + CreateContents(spawner->GetRandomDefinition()); + SetGraphics(0, 0, Contents()->GetID(), GFX_Overlay, GFXOV_MODE_Base); + SetObjDrawTransform(1000, 0, 0, 0, 1000, -5000, 0, 1); +} + +private func Timer() +{ + if (!Contents()) + { + framesUntilRespawn -= 5; + if (framesUntilRespawn <= 0) SpawnObject(); + } + + angle = (angle + 10) % 360; + SetObjDrawTransform(1000, 0, 0, 0, 1000, Sin(angle, 8) * 1000 - 2000, 0, 1); + if (Random(2)) CreateParticle("NoGravSpark", RandomX(-5, 5), RandomX(5, 10), 0, -5, 25, RGBa(210, 210, 255, 100)); +} + +protected func RejectEntrance(object container) +{ + // Still in countdown? + if (!gameStarted) return true; + + // Container has to be a crew member + if (!(container->GetOCF() & OCF_CrewMember)) return true; + + // Ready? + if (!Contents()) return true; + + // Try to let container collect the object + container->Collect(Contents()); + + // Object still there? Then something went wrong + if (Contents()) return true; + + container->Sound("Grab", false, 0, 0, GetOwner(container) + 1); + + SetGraphics(0, 0, 0, GFX_Overlay, GFXOV_MODE_Base); + framesUntilRespawn = spawner->GetSpawnInterval(); + + return true; +} diff --git a/TemplePushing.c4s/Misc.c4d/Symbols.c4d/Ambience.c4d/DefCore.txt b/TemplePushing.c4s/Misc.c4d/Symbols.c4d/Ambience.c4d/DefCore.txt new file mode 100644 index 0000000..0e1cca2 --- /dev/null +++ b/TemplePushing.c4s/Misc.c4d/Symbols.c4d/Ambience.c4d/DefCore.txt @@ -0,0 +1,6 @@ +[DefCore] +id=SABC +Name=SymbolForAmbience +Version=4,9,5 +Category=C4D_StaticBack +Picture=0,0,64,64 diff --git a/TemplePushing.c4s/Misc.c4d/Symbols.c4d/Ambience.c4d/Graphics.png b/TemplePushing.c4s/Misc.c4d/Symbols.c4d/Ambience.c4d/Graphics.png Binary files differnew file mode 100644 index 0000000..0278731 --- /dev/null +++ b/TemplePushing.c4s/Misc.c4d/Symbols.c4d/Ambience.c4d/Graphics.png diff --git a/TemplePushing.c4s/Misc.c4d/Symbols.c4d/Ambience.c4d/Names.txt b/TemplePushing.c4s/Misc.c4d/Symbols.c4d/Ambience.c4d/Names.txt new file mode 100644 index 0000000..72d8d41 --- /dev/null +++ b/TemplePushing.c4s/Misc.c4d/Symbols.c4d/Ambience.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Ambiente +US:Ambience
\ No newline at end of file diff --git a/TemplePushing.c4s/Misc.c4d/Symbols.c4d/Leaver.c4d/DefCore.txt b/TemplePushing.c4s/Misc.c4d/Symbols.c4d/Leaver.c4d/DefCore.txt new file mode 100644 index 0000000..41fde4b --- /dev/null +++ b/TemplePushing.c4s/Misc.c4d/Symbols.c4d/Leaver.c4d/DefCore.txt @@ -0,0 +1,6 @@ +[DefCore] +id=SLVR +Name=SymbolForLeaver +Version=4,9,5 +Category=C4D_StaticBack +Picture=0,0,64,64
\ No newline at end of file diff --git a/TemplePushing.c4s/Misc.c4d/Symbols.c4d/Leaver.c4d/Graphics.png b/TemplePushing.c4s/Misc.c4d/Symbols.c4d/Leaver.c4d/Graphics.png Binary files differnew file mode 100644 index 0000000..0bb3195 --- /dev/null +++ b/TemplePushing.c4s/Misc.c4d/Symbols.c4d/Leaver.c4d/Graphics.png diff --git a/TemplePushing.c4s/Misc.c4d/Symbols.c4d/Leaver.c4d/Names.txt b/TemplePushing.c4s/Misc.c4d/Symbols.c4d/Leaver.c4d/Names.txt new file mode 100644 index 0000000..710cac9 --- /dev/null +++ b/TemplePushing.c4s/Misc.c4d/Symbols.c4d/Leaver.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Leaver +US:Leaver
\ No newline at end of file diff --git a/TemplePushing.c4s/Misc.c4d/Symbols.c4d/Names.txt b/TemplePushing.c4s/Misc.c4d/Symbols.c4d/Names.txt new file mode 100644 index 0000000..eac2f57 --- /dev/null +++ b/TemplePushing.c4s/Misc.c4d/Symbols.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Symbole +US:Symbols diff --git a/TemplePushing.c4s/Misc.c4d/TeamSymbols.c4d/DefCore.txt b/TemplePushing.c4s/Misc.c4d/TeamSymbols.c4d/DefCore.txt new file mode 100644 index 0000000..8668e4b --- /dev/null +++ b/TemplePushing.c4s/Misc.c4d/TeamSymbols.c4d/DefCore.txt @@ -0,0 +1,8 @@ +[DefCore] +id=TMS1 +Version=4,9,8 +Name=TeamSymbols +Category=C4D_StaticBack +Width=1 +Height=1 +Picture=0,0,64,64 diff --git a/TemplePushing.c4s/Misc.c4d/TeamSymbols.c4d/Graphics.png b/TemplePushing.c4s/Misc.c4d/TeamSymbols.c4d/Graphics.png Binary files differnew file mode 100644 index 0000000..bcce561 --- /dev/null +++ b/TemplePushing.c4s/Misc.c4d/TeamSymbols.c4d/Graphics.png diff --git a/TemplePushing.c4s/Misc.c4d/TeamSymbols.c4d/Names.txt b/TemplePushing.c4s/Misc.c4d/TeamSymbols.c4d/Names.txt new file mode 100644 index 0000000..cdbcf76 --- /dev/null +++ b/TemplePushing.c4s/Misc.c4d/TeamSymbols.c4d/Names.txt @@ -0,0 +1,2 @@ +DE:Teamsymbole +US:Team Symbols
\ No newline at end of file |
