summaryrefslogtreecommitdiffstats
path: root/TemplePushing.c4s/Sections.c4d/SectCloudTemple.c4d/Script.c
blob: b2f1c257efce63ac147edfad1411c6c0cb5e3507 (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
63
64
/*-- Cloud temple scenario section --*/

#strict 2

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

public func SpawnpointLocations() { return [[70, 100], [140, 310], [1105, 310], [431, 443], [830, 160], [420, 160], [300, 90], [230, 440], [320, 310], [530, 90], [625, 160],[720, 90], [930, 310], [820, 440], [950, 90], [1180, 100]]; } 

protected func Initialize()
{
	Music();
	
	// Create "Clouds"	
	for (var i; i < 100; ++i)
	{
		if (mode == MODE_Apocalyptic)
		{
			CreateParticle("Fog3", Random(LandscapeWidth()), RandomX(570, 700) -10, 0, 0, RandomX(1250, 2000), RGB(255,0,0));
		}
		else
		{
			CreateParticle("Fog3", Random(LandscapeWidth()), RandomX(570, 700) -10, 0, 0, RandomX(1250, 2000));
		}
	}
		
	if (ambienceEnabled)
	{
		// Create background sound
		if (mode != MODE_Apocalyptic && mode != MODE_Festive) SoundLevel("CloudAmbience", 50);
		
		// Create sun and lenseflare
		CreateObject(SONE, 0, 0, NO_OWNER);
		CreateObject(LENS, 0, 0, NO_OWNER);
	}
	
	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 and crystal colour
		SetMaterialColor(Material("Brick"), 100, 0, 0, 150, 0, 0, 20, 0, 0);
		SetMaterialColor(Material("SkyCrystal"), 245, 0, 0, 255, 0, 0, 20, 0, 0);
	}
	
	if (mode == MODE_Festive)
	{
		// Chilly ambience
		SoundLevel("FestiveAmbience", 60);
		
		// Modulate brick colour
		SetMaterialColor(Material("Brick"), 100, 100, 230, 150, 150, 255, 30, 30, 50);
	}
}