forked from Mirrors/openclonk
Fix Missions.ocf scenarios in order to work with Rule_Relaunch
parent
7fed3ea1c0
commit
750d52e06d
|
@ -57,7 +57,9 @@ func DoInit(int first_player)
|
|||
->SetInventoryTransfer(true)
|
||||
->SetLastClonkRespawn(true)
|
||||
->SetFreeCrew(true)
|
||||
->EnablePlayerRestart();
|
||||
->EnablePlayerRestart()
|
||||
->SetBaseRespawn(true)
|
||||
->SetRespawnDelay(0);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -11,12 +11,15 @@ static npc_pyrit;
|
|||
|
||||
private func DoInit(int first_player)
|
||||
{
|
||||
GetRelaunchRule()
|
||||
->SetBaseRespawn(true)
|
||||
->SetInventoryTransfer(true)
|
||||
->SetFreeCrew(true)
|
||||
->EnablePlayerRestart()
|
||||
->SetLastClonkRespawn(true);
|
||||
GetRelaunchRule()->Set({
|
||||
inventory_transfer = true,
|
||||
free_crew = true,
|
||||
relaunch_time = 36,
|
||||
respawn_at_base = true,
|
||||
default_relaunch_count = nil,
|
||||
player_restart = true,
|
||||
respawn_last_clonk = true
|
||||
});
|
||||
// Message when first player enters shroom area
|
||||
ScheduleCall(nil, Scenario.ShroomCaveCheck, 21, 0xffffff);
|
||||
// Scorching village
|
||||
|
@ -122,3 +125,8 @@ public func OnGoalsFulfilled()
|
|||
GainMissionAccess("S2Castle");
|
||||
return false;
|
||||
}
|
||||
|
||||
public func OnPlayerRelaunch()
|
||||
{
|
||||
return true;
|
||||
}
|
|
@ -33,13 +33,15 @@ protected func PostIntroInitialize()
|
|||
}
|
||||
|
||||
// Rules
|
||||
GetRelaunchRule()
|
||||
->SetDefaultRelaunches()
|
||||
->SetInventoryTransfer(true)
|
||||
->SetFreeCrew(true)
|
||||
->EnablePlayerRestart()
|
||||
->SetBaseRespawn(true)
|
||||
->SetLastClonkRespawn(true);
|
||||
GetRelaunchRule()->Set({
|
||||
inventory_transfer = true,
|
||||
free_crew = true,
|
||||
relaunch_time = 36,
|
||||
respawn_at_base = true,
|
||||
default_relaunch_count = nil,
|
||||
player_restart = true,
|
||||
respawn_last_clonk = true
|
||||
});
|
||||
|
||||
// Initialize different parts of the scenario.
|
||||
InitializeAmbience();
|
||||
|
@ -313,3 +315,8 @@ global func Particles_Smoke(...)
|
|||
}
|
||||
return p;
|
||||
}
|
||||
|
||||
public func OnPlayerRelaunch()
|
||||
{
|
||||
return true;
|
||||
}
|
|
@ -14,6 +14,15 @@ func Initialize()
|
|||
if (loc = FindLocation(Loc_InRect(0,80*8,40*8,20*8), Loc_Material("Earth")))
|
||||
CreateObjectAbove(Rock, loc.x, loc.y+3);
|
||||
SetSkyParallax(1, 20,20, 0,0, nil, nil);
|
||||
GetRelaunchRule()->Set({
|
||||
inventory_transfer = true,
|
||||
free_crew = true,
|
||||
relaunch_time = 36,
|
||||
respawn_at_base = false,
|
||||
default_relaunch_count = nil,
|
||||
player_restart = true,
|
||||
respawn_last_clonk = true
|
||||
});
|
||||
}
|
||||
|
||||
static g_was_player_init;
|
||||
|
@ -27,7 +36,6 @@ func InitializePlayer(int plr)
|
|||
g_was_player_init = true;
|
||||
}
|
||||
// Position and materials
|
||||
JoinPlayer(plr);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -55,21 +63,22 @@ func RelaunchPlayer(int plr)
|
|||
return true;
|
||||
}
|
||||
|
||||
func JoinPlayer(int plr)
|
||||
public func OnPlayerRelaunch(int plr, bool is_relaunch)
|
||||
{
|
||||
var i, crew;
|
||||
for (i=0; crew=GetCrew(plr,i); ++i)
|
||||
{
|
||||
crew->SetPosition(40*8+Random(40), 90*8-10);
|
||||
if (!i)
|
||||
{
|
||||
crew->CreateContents(GrappleBow, 2);
|
||||
crew->CreateContents(WindBag);
|
||||
crew->CreateContents(TeleGlove);
|
||||
crew->CreateContents(Dynamite, 2);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
if(!is_relaunch) return OnClonkLeftRelaunch(GetCrew(plr), plr);
|
||||
}
|
||||
|
||||
public func OnClonkLeftRelaunch(object clonk, int plr)
|
||||
{
|
||||
clonk->CreateContents(GrappleBow, 2);
|
||||
clonk->CreateContents(WindBag);
|
||||
clonk->CreateContents(TeleGlove);
|
||||
clonk->CreateContents(Dynamite, 2);
|
||||
}
|
||||
|
||||
public func RelaunchPosition()
|
||||
{
|
||||
return [40*8 + Random(40), 90*8-10];
|
||||
}
|
||||
|
||||
func OnGoalsFulfilled()
|
||||
|
|
|
@ -26,12 +26,15 @@ static g_is_initialized, // intro started
|
|||
|
||||
func Initialize()
|
||||
{
|
||||
GetRelaunchRule()
|
||||
->SetBaseRespawn(true)
|
||||
->SetFairCrew(true)
|
||||
->InventoryTransfer(true)
|
||||
->EnablePlayerRestart()
|
||||
->SetLastClonkRespawn(true);
|
||||
GetRelaunchRule()->Set({
|
||||
inventory_transfer = true,
|
||||
free_crew = true,
|
||||
relaunch_time = 36,
|
||||
respawn_at_base = true,
|
||||
default_relaunch_count = nil,
|
||||
player_restart = true,
|
||||
respawn_last_clonk = true
|
||||
});
|
||||
npc_newton->SetAlternativeSkin("MaleBlackHair");
|
||||
npc_pyrit->SetAlternativeSkin("MaleBrownHair");
|
||||
npc_woody->SetAlternativeSkin("Youngster");
|
||||
|
@ -128,3 +131,8 @@ func OnGoalsFulfilled()
|
|||
GainScenarioAchievement("Done");
|
||||
return true; // GameOver done by outro
|
||||
}
|
||||
|
||||
public func OnPlayerRelaunch()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -15,12 +15,15 @@ static npc_pyrit;
|
|||
|
||||
func DoInit(int first_player)
|
||||
{
|
||||
GetRelaunchRule()
|
||||
->SetBaseRespawn(true)
|
||||
->SetLastClonkRespawn(true)
|
||||
->SetInventoryTransfer(true)
|
||||
->SetFreeCrew(true)
|
||||
->EnablePlayerRestart();
|
||||
GetRelaunchRule()->Set({
|
||||
inventory_transfer = true,
|
||||
free_crew = true,
|
||||
relaunch_time = 36,
|
||||
respawn_at_base = true,
|
||||
default_relaunch_count = nil,
|
||||
player_restart = true,
|
||||
respawn_last_clonk = true
|
||||
});
|
||||
ClearFreeRect(530,1135, 50,2);
|
||||
if (g_last_stone_door) g_last_stone_door->DoDamage(170 - g_last_stone_door->GetDamage());
|
||||
if (g_golden_idol)
|
||||
|
@ -182,3 +185,7 @@ func OnInvincibleDamage(object damaged_target)
|
|||
return true;
|
||||
}
|
||||
|
||||
public func OnPlayerRelaunch()
|
||||
{
|
||||
return true;
|
||||
}
|
Loading…
Reference in New Issue