/
room8.asc
75 lines (50 loc) · 1.11 KB
/
room8.asc
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
// room script file
function room_Load()
{
//define eOSWeb if it doesn't exist. (it doesn't exist in 3.5.1, which this project was built on)
#ifndef eOSWeb
int eOSWeb = 8;
#endif
//automagically detect if we're running in a browser, so all onscreen keyboard based instructions can be replaced with mouse instructions
if (System.OperatingSystem == eOSWeb) {
RunningInBrowser = true;
}
//hide the ui
gAction.Visible = false;
gMain.Visible = false;
//mouse.Visible = false;
}
//can't skip to the next screen for a bit
int SCREEN_WAIT_TIME = 30;
int SCREEN_TIMER = 0;
bool CAN_SKIP_SCREEN = false;
function room_RepExec()
{
if (SCREEN_TIMER < SCREEN_WAIT_TIME)
{
SCREEN_TIMER += 1;
}
else
{
CAN_SKIP_SCREEN = true;
if(RunningInBrowser)
{
oPressAnyKey.Graphic = 36;
}
oPressAnyKey.Visible = true;
}
}
function on_mouse_click(MouseButton button)
{
if (CAN_SKIP_SCREEN)
{
cScroller.ChangeRoom(7, -100, -100);
}
}
function on_key_press(eKeyCode keycode)
{
if (CAN_SKIP_SCREEN)
{
cScroller.ChangeRoom(7, -100, -100);
}
}