diff options
author | Kelly Rauchenberger <fefferburbia@gmail.com> | 2021-02-05 20:20:21 -0500 |
---|---|---|
committer | Kelly Rauchenberger <fefferburbia@gmail.com> | 2021-02-05 20:20:21 -0500 |
commit | bd1a66887f00e186ab86a5195ebb3271ea732b38 (patch) | |
tree | d3fc0335d98f386877b991f538e2645ff6d74fd1 /res/scripts | |
parent | ccf0fab9f7b8057afc5884e70fff29109f707bf8 (diff) | |
download | tanetane-bd1a66887f00e186ab86a5195ebb3271ea732b38.tar.gz tanetane-bd1a66887f00e186ab86a5195ebb3271ea732b38.tar.bz2 tanetane-bd1a66887f00e186ab86a5195ebb3271ea732b38.zip |
Created script system
Diffstat (limited to 'res/scripts')
-rw-r--r-- | res/scripts/common.lua | 23 | ||||
-rw-r--r-- | res/scripts/script0001.lua | 4 |
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 @@ | |||
1 | SpeakerType = { | ||
2 | NONE = 0, | ||
3 | MAN = 1, | ||
4 | WOMAN = 2, | ||
5 | BOY = 3, | ||
6 | GIRL = 4, | ||
7 | NONHUMAN = 5 | ||
8 | } | ||
9 | |||
10 | function DisplayMessage(msg, name, type) | ||
11 | message():displayMessage(msg, name, type) | ||
12 | end | ||
13 | |||
14 | function WaitForEndOfMessage() | ||
15 | while (message().isMessageActive) do | ||
16 | coroutine.yield() | ||
17 | end | ||
18 | end | ||
19 | |||
20 | function HideCutsceneBars() | ||
21 | WaitForEndOfMessage() | ||
22 | message():hideCutsceneBars() | ||
23 | end | ||
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 @@ | |||
1 | function 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() | ||
4 | end | ||