summary refs log tree commit diff stats
path: root/res/scripts/common.lua
diff options
context:
space:
mode:
authorKelly Rauchenberger <fefferburbia@gmail.com>2021-02-28 11:50:05 -0500
committerKelly Rauchenberger <fefferburbia@gmail.com>2021-02-28 11:50:05 -0500
commit9eb0a78596c5351d8115d2e5361d59d7ba17c6fc (patch)
treeea45d27f7f081a92c4541c8a3233d8e118c5fdcb /res/scripts/common.lua
parent79daad81a4c613383d6bb05d9b47a02889bf23ab (diff)
downloadtanetane-9eb0a78596c5351d8115d2e5361d59d7ba17c6fc.tar.gz
tanetane-9eb0a78596c5351d8115d2e5361d59d7ba17c6fc.tar.bz2
tanetane-9eb0a78596c5351d8115d2e5361d59d7ba17c6fc.zip
Added door entryway to time passage antechamber
The entryway should also work for the door in the time_passage map. The spritesheet also contains an entryway for Mixolydia's house.
Diffstat (limited to 'res/scripts/common.lua')
-rw-r--r--res/scripts/common.lua9
1 files changed, 9 insertions, 0 deletions
diff --git a/res/scripts/common.lua b/res/scripts/common.lua index 8eb491f..1b0c4a9 100644 --- a/res/scripts/common.lua +++ b/res/scripts/common.lua
@@ -313,6 +313,15 @@ function CreateAnimatedSpriteAtPosition(alias, character, x, y, animName, direct
313 animation():setSpriteAnimation(spriteId, animName) 313 animation():setSpriteAnimation(spriteId, animName)
314end 314end
315 315
316function CreateAnimatedSpriteAtWarpPoint(alias, character, warp, animName, direction, layer)
317 local spriteId = emplaceSprite(alias)
318 local loc = getMap():getWarpPoint(warp)
319 transform():initSprite(spriteId, loc:x(), loc:y(), layer)
320 animation():initSprite(spriteId, "../res/sprites/" .. character .. "_anim.txt")
321 animation():setSpriteDirection(spriteId, direction)
322 animation():setSpriteAnimation(spriteId, animName)
323end
324
316function DestroyNamedSprite(alias) 325function DestroyNamedSprite(alias)
317 local spriteId = getSpriteByAlias(alias) 326 local spriteId = getSpriteByAlias(alias)
318 destroySprite(spriteId) 327 destroySprite(spriteId)