Exemple #1
0
func Outro_Start(object plane)
{
	// Player closest to plane becomes outro protagonist
	this.plane = plane;
	this.hero = plane->FindObject(Find_ID(Clonk), Find_Not(Find_Owner(NO_OWNER)), plane->Sort_Distance());
	SetPlayerZoomByViewRange(NO_OWNER, 200,100, PLRZOOM_Set | PLRZOOM_LimitMax);
	SetViewTarget(this.hero);
	npc_pyrit.has_sequence = true; // Pyrit stops hammering
	return ScheduleNext(5);
}
Exemple #2
0
func Outro_Start(object goal, object plane)
{
	this.goal = goal;
	this.plane = plane;
	this.hero = plane->FindObject(Find_Not(Find_Owner(NO_OWNER)), Find_ID(Clonk), plane->Sort_Distance());
	
	SetViewTarget(this.plane);
	
	MessageBoxAll("$Outro1$", this.hero, true);
	
	return ScheduleNext(150);
}
Exemple #3
0
func FxPyritHammeringTimer(object c, proplist fx, int time)
{
	if (!fx.hat)
	{
		// Pyit has a red hat!
		fx.hat = c->AttachMesh(Hat, "skeleton_head", "main", Trans_Translate(5500, 0, 0));
	}
	if (FrameCounter() < this.anim_continue_frame || c.has_sequence) return FX_OK;
	this.anim = 0;
	if (!fx.catapult) if (!(fx.catapult = c->FindObject(Find_ID(Catapult), Sort_Distance()))) return FX_OK;
	if ((!Random(20) && GetPlayerCount()) || this.was_walk_interrupted)
	{
		// Move between two places (only if players are joined so Pyrit stays in place for object saving)
		var new_pos = [fx.catapult->GetX()-24, fx.catapult->GetX()+26][c->GetX() < fx.catapult->GetX()];
		c->SetCommand("MoveTo", nil, new_pos, fx.catapult->GetY());
		this.anim_continue_frame = FrameCounter() + 50;
		this.was_walk_interrupted = false;
	}