Пример #1
0
protected func Initialize()
{
  SetVisibility(VIS_All());
  SetPlrView(GetOwner(), this());
  SetAction("Fly");
  Sound("Morse", 0,this(),100,0, 1);
}
Пример #2
0
func Rift_Warp_4()
{
	SetAmbientBrightness(20);
	this.hero->SetLightRange(100, 30);
	SetViewTarget(this.hero);
	SetPlrView(this.hero->GetOwner(), this.hero, true);
	return ScheduleNext(30);
}
Пример #3
0
func Initialize()
{
	if (g_camera) FatalError("OMG two cameras!");
	g_camera = this;
	// Make action modifyable
	this.ActMap = {Prototype = Camera.ActMap };
	this.ActMap.Fly = {Prototype = Camera.ActMap.Fly };
	SetAction("Fly");
	for (var i=0; i<GetPlayerCount(C4PT_User); ++i)
		SetPlrView(GetPlayerByIndex(i, C4PT_User), this);
	SetPlayerViewLock(NO_OWNER, true);
}
Пример #4
0
global func IntroAddPlayer(int plr)
{
	var effect = GetEffect("IntIntro");
	if(!effect) return false;
	if(effect.Time > 30) return false;

	var crew;
	for(var index = 0; crew = GetCrew(plr, index); ++index)
	{
	        var skin = crew->GetCrewExtraData("Skin");
        	if (skin == nil) skin = GetPlrClonkSkin(plr);

		var container = effect.Cabin->CreateContents(Clonk);
		container->SetOwner(plr);
		if(skin != nil) container->SetSkin(skin);
		container->SetName(crew->GetName());
		container->SetAction("Walk");
		crew->Enter(container);

		container.ActMap = { Prototype = Clonk.ActMap };
		container.ActMap.Walk = { Prototype = Clonk.ActMap.Walk, Decel = 100 };
		container.ActMap.Jump = { Prototype = Clonk.ActMap.Jump, Speed = 0, Accel = 0 };
		container.JumpSpeed = 0;

		SetPlrView(plr, crew);
		SetPlayerViewLock(plr, true);
		SetPlayerZoomByViewRange(plr, 320, 240);

		container->SetCommand("None", container);
		crew->SetCommand("None", crew);

		// Give everyone but the first player a shovel -- the first
		// player's shovel can be found in the valley
		if(GetLength(effect.Players) != 0)
			crew->CreateContents(Shovel);

		effect.Players[GetLength(effect.Players)] = crew;
	}

	return true;
}