-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBox Example.ink
More file actions
66 lines (52 loc) · 1.39 KB
/
Box Example.ink
File metadata and controls
66 lines (52 loc) · 1.39 KB
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
VAR apples = 0
VAR pineapples = 0
VAR boxA = false
VAR boxB = false
VAR boxC = false
->box_example
===function open_boxA()
//add the contents
~apples = apples + 1
~pineapples = pineapples + 4
//remove the option, since box A is already in box D
~boxA = true
===function open_boxB()
~apples = apples + 4
~boxB = true
===function open_boxC()
~pineapples = pineapples + 1
~boxC = true
===function remove_boxA()
//remove the contents
~apples = apples - 1
~pineapples = pineapples - 4
//add the option to the menu
~boxA = false
===function remove_boxB()
~apples = apples - 4
~boxB = false
===function remove_boxC()
~pineapples = pineapples - 1
~boxC = false
===box_example===
I open the door. Inside are four boxes.
I mark them A, B, C, and D.
I have decided to screw around with box D.
-(decision)What should I do?
//Added conditionals to the choices, if the box has been added, it takes away that option.
+ { not boxA }Add box A
I open box A, and throw it into box D.
{open_boxA()}
+ {not boxB }Add box B
{open_boxB()}
+ {not boxC }Add box C
{open_boxC()}
//Likewise, if the box has not yet been added to D, it will not allow the player the option to remove.
+ { boxA }Remove box A
{remove_boxA()}
+ { boxB }Remove box B
{remove_boxB()}
+ { boxC }Remove box C
{remove_boxC()}
-There are now {apples} apples and {pineapples} pineapples in Box D.
->decision