Exemple #1
0
func Initialize()
{
	var offs = 45;
	CreateObjectAbove(WindGenerator, 1147, 938+offs)->SetR(7);
	CreateObjectAbove(WindGenerator, 985, 1105+offs)->SetR(-170);
	CreateObjectAbove(WindGenerator, 1055, 1085+offs)->SetR(140);
	CreateObjectAbove(WindGenerator, 971, 857+offs)->SetR(-20);
	CreateObjectAbove(WindGenerator, 1147, 1035+offs)->SetR(160);
	CreateObjectAbove(WindGenerator, 1036, 870+offs)->SetR(-10);
	CreateObjectAbove(WindGenerator, 1081, 873+offs)->SetR(18);
	CreateObjectAbove(WindGenerator, 858, 930+offs)->SetR(-10);
	
	CreateObject(Goal_SaveTheWindmills,10,10);
	PlaceGrass(100, 800, 1400);
	SetSkyParallax(0,25,25,0,0,0,50);
	AddEffect("BoomAttack", nil, 100, 35);
	Sound("WindLoop",true,40,nil,+1);
}
Exemple #2
0
protected func Initialize()
{
	// Environment 
	PlaceGrass(185);
	
	// Goal: Capture the flag, with bases in both hideouts.
	var goal = CreateObject(Goal_CaptureTheFlag, 0, 0, NO_OWNER);
	goal->SetFlagBase(1, 120, 502);
	goal->SetFlagBase(2, LandscapeWidth() - 120, 502);
	
	// Rules
	CreateObject(Rule_Restart);
	CreateObject(Rule_ObjectFade)->DoFadeTime(5 * 36);
	CreateObject(Rule_KillLogs);
	CreateObject(Rule_Gravestones);
	
	var lwidth = LandscapeWidth();
	
	// Doors and spinwheels.
	var gate, wheel;
	gate = CreateObjectAbove(StoneDoor, 364, 448, NO_OWNER);
	DrawMaterialQuad("Tunnel-brickback", 360, 446, 360, 448, 368, 448, 368, 446);
	gate->DoDamage(50);		// Upper doors are easier to destroy
	gate->SetAutoControl(1);
	gate = CreateObjectAbove(StoneDoor, 340, 584, NO_OWNER);
	DrawMaterialQuad("Tunnel-brickback", 336, 582, 336, 584, 344, 584, 344, 582);
	gate->SetAutoControl(1);
	gate = CreateObjectAbove(StoneDoor, 692, 544, NO_OWNER);
	DrawMaterialQuad("Tunnel-brickback", 688, 542, 688, 544, 696, 544, 696, 542);
	gate->DoDamage(80);		// Middle doors even easier
	wheel = CreateObjectAbove(SpinWheel, 660, 552, NO_OWNER);
	wheel->SetStoneDoor(gate);
	
	gate = CreateObjectAbove(StoneDoor, lwidth - 364, 448, NO_OWNER);
	DrawMaterialQuad("Tunnel-brickback", lwidth - 361, 446, lwidth - 361, 448, lwidth - 365, 448, lwidth - 365, 446);
	gate->DoDamage(50);		// Upper doors are easier to destroy
	gate->SetAutoControl(2);
	gate = CreateObjectAbove(StoneDoor, lwidth - 340, 584, NO_OWNER);
	DrawMaterialQuad("Tunnel-brickback", lwidth - 337, 582, lwidth - 337, 584, lwidth - 345, 584, lwidth - 345, 582);
	gate->SetAutoControl(2);
	gate = CreateObjectAbove(StoneDoor, lwidth - 692, 544, NO_OWNER);
	DrawMaterialQuad("Tunnel-brickback", lwidth - 689, 542, lwidth - 689, 544, lwidth - 697, 544, lwidth - 697, 542);
	gate->DoDamage(80);		// Middle doors even easier
	wheel = CreateObjectAbove(SpinWheel, lwidth - 660, 552, NO_OWNER);
	wheel->SetStoneDoor(gate);
	
	// Chests with weapons.
	var chest;
	chest = CreateObjectAbove(Chest, 110, 592, NO_OWNER);
	chest->MakeInvincible();
	AddEffect("FillBaseChest", chest, 100, 6 * 36,nil,nil,true);
	chest = CreateObjectAbove(Chest, 25, 464, NO_OWNER);
	chest->MakeInvincible();
	AddEffect("FillBaseChest", chest, 100, 6 * 36,nil,nil,false);
	chest = CreateObjectAbove(Chest, 730, 408, NO_OWNER);
	chest->MakeInvincible();
	AddEffect("FillOtherChest", chest, 100, 6 * 36);
	chest = CreateObjectAbove(Chest, lwidth - 110, 592, NO_OWNER);
	chest->MakeInvincible();
	AddEffect("FillBaseChest", chest, 100, 6 * 36,nil,nil,true);
	chest = CreateObjectAbove(Chest, lwidth - 25, 464, NO_OWNER);
	chest->MakeInvincible();
	AddEffect("FillBaseChest", chest, 100, 6 * 36,nil,nil,false);
	chest = CreateObjectAbove(Chest, lwidth - 730, 408, NO_OWNER);
	chest->MakeInvincible();
	AddEffect("FillOtherChest", chest, 100, 6 * 36);
	chest = CreateObjectAbove(Chest, lwidth/2, 512, NO_OWNER);
	chest->MakeInvincible();
	AddEffect("FillSpecialChest", chest, 100, 4 * 36);
	
	/*
	// No Cannons
	// Cannons loaded with 12 shots.
	var cannon;
	cannon = CreateObjectAbove(Cannon, 429, 444, NO_OWNER);
	cannon->SetDir(DIR_Right);
	cannon->SetR(15);
	cannon->CreateContents(PowderKeg);
	cannon = CreateObjectAbove(Cannon, lwidth - 429, 444, NO_OWNER);
	cannon->SetDir(DIR_Left);
	cannon->SetR(-15);
	cannon->CreateContents(PowderKeg);
	*/

	return;
}