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/scripts/common.lua | |
| 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/scripts/common.lua')
| -rw-r--r-- | res/scripts/common.lua | 17 |
1 files changed, 17 insertions, 0 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 | ||
