From 9eb0a78596c5351d8115d2e5361d59d7ba17c6fc Mon Sep 17 00:00:00 2001 From: Kelly Rauchenberger Date: Sun, 28 Feb 2021 11:50:05 -0500 Subject: 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. --- res/scripts/common.lua | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'res/scripts/common.lua') 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 animation():setSpriteAnimation(spriteId, animName) end +function CreateAnimatedSpriteAtWarpPoint(alias, character, warp, animName, direction, layer) + local spriteId = emplaceSprite(alias) + local loc = getMap():getWarpPoint(warp) + transform():initSprite(spriteId, loc:x(), loc:y(), layer) + animation():initSprite(spriteId, "../res/sprites/" .. character .. "_anim.txt") + animation():setSpriteDirection(spriteId, direction) + animation():setSpriteAnimation(spriteId, animName) +end + function DestroyNamedSprite(alias) local spriteId = getSpriteByAlias(alias) destroySprite(spriteId) -- cgit 1.4.1