summary refs log tree commit diff stats
path: root/res
diff options
context:
space:
mode:
Diffstat (limited to 'res')
-rw-r--r--res/scripts/common.lua14
1 files changed, 14 insertions, 0 deletions
diff --git a/res/scripts/common.lua b/res/scripts/common.lua index e355a32..2e95f26 100644 --- a/res/scripts/common.lua +++ b/res/scripts/common.lua
@@ -423,6 +423,20 @@ function SetOpacity(spriteName, amount)
423 sprite.opacity = amount 423 sprite.opacity = amount
424end 424end
425 425
426--- Fades out the given sprite.
427function FadeOutSprite(spriteName)
428 local spriteId = getSpriteByAlias(spriteName)
429 local sprite = getSprite(spriteId)
430 sprite.shouldBeFadedIn = false
431end
432
433--- Fades out the given sprite.
434function FadeInSprite(spriteName)
435 local spriteId = getSpriteByAlias(spriteName)
436 local sprite = getSprite(spriteId)
437 sprite.shouldBeFadedIn = true
438end
439
426--- Sets the enclosure zone for a sprite. 440--- Sets the enclosure zone for a sprite.
427-- The sprite will be prevented from exiting the area defined by that zone. 441-- The sprite will be prevented from exiting the area defined by that zone.
428function AddEnclosureZone(spriteName, zone) 442function AddEnclosureZone(spriteName, zone)