-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexample.gds
More file actions
60 lines (46 loc) · 1.33 KB
/
example.gds
File metadata and controls
60 lines (46 loc) · 1.33 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
# Game Dialog Script Example
# Character variables
playerName = "Arthur"
reputation = 75
level = 10
gold = 500
# Greeting
<< "Welcome to the tavern, traveler!"
# Reputation check
if reputation > 50
<< "Good to see you again, " + playerName + "!"
<< "Your reputation precedes you."
else
<< "I don't believe we've met before."
<< "Who might you be?"
# Level check for special dialog
if level >= 10
<< "You look like an experienced adventurer."
<< "Perhaps you'd be interested in a special quest?"
# Gold dialog
<< "You currently have " + gold + " gold coins."
if gold < 100
<< "Times are tough, I see."
else
<< "That's a decent purse you've got there!"
# Loop for displaying items
itemCount = 3
currentItem = 1
<< "Here are the items available:"
while currentItem <= itemCount
<< "Item #" + currentItem
currentItem = currentItem + 1
<< "Thank you for visiting!"
<< "Sum: {itemCount + currentItem}"
a = """This is a multi-line string.
It can span several lines.
Useful for long messages."""
<< """"
It's another multi-line string example.
With intentation preserved. {a}
""""
<< a + """ Additional text appended.
multi-line strings are versatile! """
b = a + """ More text in b.
This shows concatenation. """ + """ Even more text.
Multi-line strings can be combined. """