diff options
author | Kelly Rauchenberger <fefferburbia@gmail.com> | 2021-02-06 21:15:34 -0500 |
---|---|---|
committer | Kelly Rauchenberger <fefferburbia@gmail.com> | 2021-02-06 21:15:34 -0500 |
commit | 0e1e97da9e8937d19b0101dcc1f3a16e3db495b6 (patch) | |
tree | 64472e8e640bc9884a938106a49b87b43852aa75 /res | |
parent | cb7617344c3b7994cb40d6253a77dbfa3d3ff984 (diff) | |
download | tanetane-0e1e97da9e8937d19b0101dcc1f3a16e3db495b6.tar.gz tanetane-0e1e97da9e8937d19b0101dcc1f3a16e3db495b6.tar.bz2 tanetane-0e1e97da9e8937d19b0101dcc1f3a16e3db495b6.zip |
Added sound and animation changes to scripting
Diffstat (limited to 'res')
-rw-r--r-- | res/scripts/common.lua | 17 | ||||
-rw-r--r-- | res/scripts/script0001.lua | 10 | ||||
-rw-r--r-- | res/sfx/barking_at_hallucination.wav | bin | 0 -> 1773472 bytes | |||
-rw-r--r-- | res/sfx/boney_growl.wav | bin | 0 -> 376720 bytes | |||
-rw-r--r-- | res/sprites/boney_anim.txt | 10 |
5 files changed, 35 insertions, 2 deletions
diff --git a/res/scripts/common.lua b/res/scripts/common.lua index 7e8276f..e7af1cf 100644 --- a/res/scripts/common.lua +++ b/res/scripts/common.lua | |||
@@ -21,3 +21,20 @@ function HideCutsceneBars() | |||
21 | WaitForEndOfMessage() | 21 | WaitForEndOfMessage() |
22 | message():hideCutsceneBars() | 22 | message():hideCutsceneBars() |
23 | end | 23 | end |
24 | |||
25 | function SetAnimation(spriteName, animName) | ||
26 | local spriteId = getSpriteByAlias(spriteName) | ||
27 | animation():setSpriteAnimation(spriteId, animName) | ||
28 | end | ||
29 | |||
30 | function PlaySound(filename) | ||
31 | mixer():playSound("../res/sfx/" .. filename) | ||
32 | end | ||
33 | |||
34 | function LoopSound(filename) | ||
35 | return mixer():loopSound("../res/sfx/" .. filename) | ||
36 | end | ||
37 | |||
38 | function StopSound(soundId) | ||
39 | mixer():stopChannel(soundId) | ||
40 | end | ||
diff --git a/res/scripts/script0001.lua b/res/scripts/script0001.lua index 3a09705..326b37c 100644 --- a/res/scripts/script0001.lua +++ b/res/scripts/script0001.lua | |||
@@ -1,4 +1,12 @@ | |||
1 | function script0001() | 1 | function script0001() |
2 | DisplayMessage("It's almost suppertime.\nHinawa should be back soon.\nWhat? She's not coming back? Why, did you do something to her?\nHuh? I did it to her? Hinawa isn't coming back?\nWho are you? What did you do?\nIt's time for supper. It's time for supper.", "Flint", SpeakerType.MAN) | 2 | SetAnimation("boney", "barking") |
3 | local barkingNoise = LoopSound("barking_at_hallucination.wav") | ||
4 | |||
5 | DisplayMessage("Lucas. It's me, Flint. Your father.\nI found Claus. He's here. After three years I've finally found your brother.\nLook at me when I'm talking to you, Lucas.\nWhen Claus gets home, we won't need you anymore. You're nothing compared to him.", "Flint", SpeakerType.MAN) | ||
6 | WaitForEndOfMessage() | ||
7 | |||
8 | SetAnimation("boney", "crouch") | ||
9 | StopSound(barkingNoise) | ||
10 | PlaySound("boney_growl.wav") | ||
3 | HideCutsceneBars() | 11 | HideCutsceneBars() |
4 | end | 12 | end |
diff --git a/res/sfx/barking_at_hallucination.wav b/res/sfx/barking_at_hallucination.wav new file mode 100644 index 0000000..1cca6a5 --- /dev/null +++ b/res/sfx/barking_at_hallucination.wav | |||
Binary files differ | |||
diff --git a/res/sfx/boney_growl.wav b/res/sfx/boney_growl.wav new file mode 100644 index 0000000..9d70db2 --- /dev/null +++ b/res/sfx/boney_growl.wav | |||
Binary files differ | |||
diff --git a/res/sprites/boney_anim.txt b/res/sprites/boney_anim.txt index a384105..324860e 100644 --- a/res/sprites/boney_anim.txt +++ b/res/sprites/boney_anim.txt | |||
@@ -31,4 +31,12 @@ run[up_left]: 51,59,67,75 | |||
31 | run[up]: 52,60,68,76 | 31 | run[up]: 52,60,68,76 |
32 | run[up_right]: 53,61,69,77 | 32 | run[up_right]: 53,61,69,77 |
33 | run[right]: 54,62,70,78 | 33 | run[right]: 54,62,70,78 |
34 | run[down_right]: 55,63,71,79 \ No newline at end of file | 34 | run[down_right]: 55,63,71,79 |
35 | barking[down]: 0,32,40,32,40,32,40 | ||
36 | barking[down_left]: 1,33,41,33,41,33,41 | ||
37 | barking[left]: 2,34,42,34,42,34,42 | ||
38 | barking[up_left]: 3,35,43,35,43,35,43 | ||
39 | barking[up]: 4,36,44,36,44,36,44 | ||
40 | barking[up_right]: 5,37,45,37,45,37,45 | ||
41 | barking[right]: 6,38,46,38,46,38,46 | ||
42 | barking[down_right]: 7,39,47,39,47,39,47 \ No newline at end of file | ||