-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathDoorsMAP04.txt
142 lines (127 loc) · 2.77 KB
/
DoorsMAP04.txt
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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
/*
Hall of Doors ACS Script
MAP04
*/
#include "zcommon.acs"
global int 0:reward;
// all of the sector tags and wall linedef textures must
// correspond to the given variables for randomization
int ceilingAndFloorTag = 1;
str wallTexture = "GRAY4";
str DoorTexture = "BIGDOOR1";
//Open Door Reward Forward
script 1 (void)
{
Generic_Door(0, 34, 0, 16, 0);
//reward += 50.0;
}
//Open Door Reward Reverse
script 2 (void)
{
Generic_Door(0, 34, 0, 16, 0);
//reward += 5.0;
}
//Exit Reward
script 3 (void)
{
reward += 20.0;
Exit_Normal(0);
}
//Reward for moving through doors
script 4 (void){
reward += 50.0;
//print(f:reward);
}
//Reward for moving through corridors
script 5 (void){
reward += 10.0;
//print(f:reward);
}
//Randomizes player starting angle
script 6 ENTER
{
SetActorAngle(0, random(0.30, 0.70));
}
//Wall Bump Penalty
script 7 (void)
{
reward -= 10.0;
}
// randomly chooses a ceiling texture per entering the level
script 20 ENTER {
switch (Random(1,3)) {
case 1:
ChangeCeiling(ceilingAndFloorTag,"CEIL3_5");
break;
case 2:
ChangeCeiling(ceilingAndFloorTag,"COMP01");
break;
case 3:
ChangeCeiling(ceilingAndFloorTag,"FLAT2");
break;
}
}
// randomly chooses a floor texture per entering the level
script 21 ENTER {
switch (Random(1,3)) {
case 1:
ChangeFloor(ceilingAndFloorTag,"FLAT8");
break;
case 2:
ChangeFloor(ceilingAndFloorTag,"FLOOR0_5");
break;
case 3:
ChangeFloor(ceilingAndFloorTag,"FLOOR3_3");
break;
}
}
// randomly chooses a wall texture per entering the level
script 22 ENTER {
switch (Random(1,3)) {
case 1:
ReplaceTextures(WallTexture,"CRATE1");
break;
case 2:
ReplaceTextures(wallTexture,"GRAY4");
break;
case 3:
ReplaceTextures(wallTexture,"STUCCO");
break;
}
}
//Randomly Selects Door Texture at Level Enter
script 24 ENTER {
switch (Random(1,3)) {
case 1:
ReplaceTextures(DoorTexture,"BIGDOOR1");
break;
case 2:
ReplaceTextures(DoorTexture,"BIGDOOR2");
break;
case 3:
ReplaceTextures(DoorTexture,"BIGDOOR5");
break;
case 4:
ReplaceTextures(DoorTexture,"EXITDOOR");
break;
}
}
//Rewards general movement
script 50 ENTER
{
int yf, xf;
int xi = GetActorX(0);
int yi = GetActorY(0);
while(TRUE)
{
yf = GetActorY(0);
xf = GetActorX(0);
if(yf != yi || xf != xi)
{
reward += 1.0;
yi = yf;
xi = xf;
}
Delay(1);
}
}