Example #1
0
func Intro_PlaneHit()
{
	// Plane hit ground! Continue sequence.
	Sound("Objects::Plane::PlaneCrash", true);
	SetR(-90);
	var particles = Particles_Smoke(true);
	particles.Size = PV_Linear(PV_Random(20, 60), PV_Random(50, 100));
	CreateParticle("Smoke", PV_Random(-30,30), PV_Random(-30,30), PV_Random(-60, 60), PV_Random(-20,0), PV_Random(200, 500), particles, 20);
	particles.Size = PV_Linear(PV_Random(50, 80), PV_Random(100, 200));
	CreateParticle("Smoke", PV_Random(-30,30), PV_Random(-30,30), PV_Random(-20, 20), PV_Random(-20,0), PV_Random(100, 200), particles, 20);
	for (var iplr=0,plr; iplr<GetPlayerCount(C4PT_User); ++iplr)
	{
		plr = GetPlayerByIndex(iplr, C4PT_User);
		var icrew=0,crew;
		while (crew=GetCrew(plr, icrew++))
		{
			crew->Exit(0,-5, 0, Random(1)+1, Random(5)-6);
			crew->SetAction("Tumble");
		}
	}
	SetMeshMaterial("CrashedAirplane");
	this.MeshTransformation=Trans_Mul(Trans_Rotate(10,0,2,1), Airplane.MeshTransformation);
	this.Hit = this.intro_seq.plane_Hit;
	this.intro_seq.plane_crashed = true;
	this.intro_seq->ScheduleNext(50);
	return true;
}
Example #2
0
private func GetCarryTransform(clonk)
{
	var offset;
	if (GetCarrySpecial(clonk))
	{
		offset = Trans_Translate(3000, 0, 0);
	}
	else
	{
		offset = Trans_Identity();
	}
	return Trans_Mul(Trans_Rotate(90, 0, 0, 1), offset);
}
Example #3
0
func Death()
{
	RemoveTimer(this.UpdateSwim);
	RemoveTimer(this.Activity);
	this.MeshTransformation = Trans_Rotate(160 + Random(41), 1, 0, 0);
	if (base_transform) this.MeshTransformation = Trans_Mul(base_transform, this.MeshTransformation);
	StopAnimation(swim_animation);
	AddTimer(this.Decaying, 500);
	this.Collectible = true;
	
	// maybe respawn a new fish if roe is near
	var roe = FindObject(Find_Distance(200), Find_ID(FishRoe));
	if (roe)
		roe->Hatch(GetID());
	
	return _inherited(...);
}
Example #4
0
protected func Construction()
{
	//SetProperty("MeshTransformation", Trans_Mul(Trans_Rotate(RandomX(-180,180),RandomX(-10,10),10), Trans_Scale(RandomX(5,10))));
	SetProperty("MeshTransformation", Trans_Mul(Trans_Rotate(RandomX(-180,180), 0, 1, 0), Trans_Scale(10)));
}
Example #5
0
protected func Initialize()
{
	SetProperty("MeshTransformation",Trans_Mul(Trans_Scale(150,150,150),Trans_Rotate(Random(360),0,1,0)));
}
Example #6
0
protected func Construction()
{
	SetProperty("MeshTransformation", Trans_Mul(Trans_Rotate(RandomX(-40,40),0,20), Trans_Scale(550)));
}
Example #7
0
func Construction()
{
	SetProperty("MeshTransformation", Trans_Mul(Trans_Rotate(RandomX(-180,180),0,10), Trans_Scale(RandomX(787,1212)), GetID().MeshTransformation));
}
Example #8
0
protected func Initialize()
{
	this.MeshTransformation = Trans_Mul(Trans_Scale(1000, 1400, 1000), Trans_Translate(0, 3500, 0), Trans_Rotate(RandomX(0, 359), 0, 1, 0));
	SetR(RandomX(-30, 30));
	return;
}