summary refs log tree commit diff stats
path: root/res/scripts
diff options
context:
space:
mode:
authorKelly Rauchenberger <fefferburbia@gmail.com>2021-02-05 20:20:21 -0500
committerKelly Rauchenberger <fefferburbia@gmail.com>2021-02-05 20:20:21 -0500
commitbd1a66887f00e186ab86a5195ebb3271ea732b38 (patch)
treed3fc0335d98f386877b991f538e2645ff6d74fd1 /res/scripts
parentccf0fab9f7b8057afc5884e70fff29109f707bf8 (diff)
downloadtanetane-bd1a66887f00e186ab86a5195ebb3271ea732b38.tar.gz
tanetane-bd1a66887f00e186ab86a5195ebb3271ea732b38.tar.bz2
tanetane-bd1a66887f00e186ab86a5195ebb3271ea732b38.zip
Created script system
Diffstat (limited to 'res/scripts')
-rw-r--r--res/scripts/common.lua23
-rw-r--r--res/scripts/script0001.lua4
2 files changed, 27 insertions, 0 deletions
diff --git a/res/scripts/common.lua b/res/scripts/common.lua new file mode 100644 index 0000000..7e8276f --- /dev/null +++ b/res/scripts/common.lua
@@ -0,0 +1,23 @@
1SpeakerType = {
2 NONE = 0,
3 MAN = 1,
4 WOMAN = 2,
5 BOY = 3,
6 GIRL = 4,
7 NONHUMAN = 5
8}
9
10function DisplayMessage(msg, name, type)
11 message():displayMessage(msg, name, type)
12end
13
14function WaitForEndOfMessage()
15 while (message().isMessageActive) do
16 coroutine.yield()
17 end
18end
19
20function HideCutsceneBars()
21 WaitForEndOfMessage()
22 message():hideCutsceneBars()
23end
diff --git a/res/scripts/script0001.lua b/res/scripts/script0001.lua new file mode 100644 index 0000000..a259e47 --- /dev/null +++ b/res/scripts/script0001.lua
@@ -0,0 +1,4 @@
1function script0001()
2 DisplayMessage("Some people always try to avoid fighting when there are enemies around. You know the type, right? They use the dash ability to zoom right by. I guess you could say they're followers of \"peace at any price\".", "Sparrow", SpeakerType.GIRL)
3 HideCutsceneBars()
4end