Deltarune script viewer

← back to main script listing

gml_Object_obj_debug_choicer_Create_0

(view raw script w/o annotations or w/e)
1
depth = 5000
2
fileExists = false
3
q = "Question Prompt?"
4
c1 = "#yes"
5
c2 = "#no"
6
c3 = "maybe"
7
c4 = "so"
8
promptcount = 4
9
fileExists = 0
10
if file_exists("choicer.txt")
11
    fileExists = 1
12
if (fileExists == 0)
13
{
14
    ini_open("choicer.txt")
15
    ini_write_real("choicer", "promptcount", promptcount)
16
    ini_write_string("choicer", "c4", c4)
17
    ini_write_string("choicer", "c3", c3)
18
    ini_write_string("choicer", "c2", c2)
19
    ini_write_string("choicer", "c1", c1)
20
    ini_write_string("choicer", "question", q)
21
    ini_close()
22
    fileExists = 1
23
}
24
else
25
{
26
    ini_open("choicer.txt")
27
    q = ini_read_string("choicer", "question", q)
28
    c1 = ini_read_string("choicer", "c1", c1)
29
    c2 = ini_read_string("choicer", "c2", c2)
30
    c3 = ini_read_string("choicer", "c3", c3)
31
    c4 = ini_read_string("choicer", "c4", c4)
32
    promptcount = ini_read_real("choicer", "promptcount", promptcount)
33
    ini_close()
34
    fileExists = 1
35
}
36
haswritten = 0
37
if (global.darkzone == 1)
38
    global.typer = 4
39
else
40
    global.typer = 1