summaryrefslogtreecommitdiffstats
path: root/TemplePushing.c4s/Sections.c4d/SectLiquidTemple.c4d/Script.c
blob: f5eb2d8aa82dd3afee6dc041148ecfd063c9fae6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
/*-- Liquid temple scenario section --*/

#strict 2

public func SectionName() { return "LiquidTemple"; }

 public func SpawnpointLocations() { return [[100, 515], [290, 490], [480, 460], [180, 315], [370, 285], [1440, 515], [1250, 490], [1060, 460], [1360, 315], [1170, 285], [715, 330], [685, 420], [770, 90], [715, 210], [825, 390], [825, 270], [825, 150]]; } 
 
 protected func Initialize()
{
	Music();
	
	if (ambienceEnabled)
	{
		// Create lava rain
		if (mode != MODE_Festive) AddEffect("LavaRain", 0, 20, 1);
		
		// Create background sound
		if (mode != MODE_Apocalyptic && mode != MODE_Festive) SoundLevel("LiquidAmbience", 50);
		
		/*
		for (var i; i < 300; ++i)
		{
			CreateParticle("Fog", Random(LandscapeWidth()), Random(LandscapeHeight()) + 300, 0, 1, RandomX(2000, 2500));
		}
		*/
	}
	
	if (mode == MODE_Apocalyptic)
	{
		// Rock fall
		for (var i = 0; i < 10; ++i)
		{
			CreateObject(RCKF, 0, 0, NO_OWNER);
		}
		
		// Fire rain
		AddEffect("FireRain", 0, 20, 1);
		CreateObject(FRRN, 0, 0, NO_OWNER);
		
		// Background sound
		SoundLevel("ExtremeAmbience", 100);
		
		// Modulate brick colour (material)
		SetMaterialColor(Material("Brick"), 100, 0, 0, 150, 0, 0, 20, 0, 0);
	}
	
	if (mode == MODE_Festive)
	{
		// Chilly ambience
		if (ambienceEnabled) SoundLevel("FestiveAmbience", 60);
		
		// Modulate material colours
		SetMaterialColor(Material("Brick"), 100, 0, 0, 150, 0, 0, 20, 0, 0);
		SetMaterialColor(Material("DarkBrick"), 100, 100, 230, 150, 150, 255, 30, 30, 50);
		SetMaterialColor(Material("BackWall"), 100, 100, 230, 150, 150, 255, 30, 30, 50);
		SetMaterialColor(Material("Wall"), 100, 100, 230, 150, 150, 255, 30, 30, 50);
		SetMaterialColor(Material("BackBrick"), 100, 100, 230, 150, 150, 255, 30, 30, 50);
	}
}