diff options
| author | Kelly Rauchenberger <fefferburbia@gmail.com> | 2021-03-09 13:31:26 -0500 |
|---|---|---|
| committer | Kelly Rauchenberger <fefferburbia@gmail.com> | 2021-03-09 13:31:26 -0500 |
| commit | 032f60bc2686364f4df5bfb6c9faf86b84de31a6 (patch) | |
| tree | 96c42392fa444677a55087742bedab375b69a21d /res/scripts/common.lua | |
| parent | 89fc2da3f08fcd751ca069fde0987d193e59b007 (diff) | |
| download | tanetane-032f60bc2686364f4df5bfb6c9faf86b84de31a6.tar.gz tanetane-032f60bc2686364f4df5bfb6c9faf86b84de31a6.tar.bz2 tanetane-032f60bc2686364f4df5bfb6c9faf86b84de31a6.zip | |
Added text for "yes" path of "let's switch places"
#10
Diffstat (limited to 'res/scripts/common.lua')
| -rw-r--r-- | res/scripts/common.lua | 15 |
1 files changed, 15 insertions, 0 deletions
| diff --git a/res/scripts/common.lua b/res/scripts/common.lua index f984667..dbc021c 100644 --- a/res/scripts/common.lua +++ b/res/scripts/common.lua | |||
| @@ -518,6 +518,21 @@ function FaceTowardSprite(spriteName, targetName) | |||
| 518 | SetDirection(spriteName, dir) | 518 | SetDirection(spriteName, dir) |
| 519 | end | 519 | end |
| 520 | 520 | ||
| 521 | --- Makes the specified sprite's entire party face toward the †arget sprite. | ||
| 522 | -- This version of the function uses any of the eight directions. | ||
| 523 | -- @param spriteName the name of the sprite to change the direction of | ||
| 524 | -- @param targetName the name of the sprite to face toward | ||
| 525 | function FacePartyTowardSprite(spriteName, targetName) | ||
| 526 | FaceTowardSprite(spriteName, targetName) | ||
| 527 | |||
| 528 | local sprite = getSprite(getSpriteByAlias(spriteName)) | ||
| 529 | |||
| 530 | for i=1,#sprite.followers do | ||
| 531 | local follower = getSprite(sprite.followers[i]) | ||
| 532 | FaceTowardSprite(follower.alias, targetName) | ||
| 533 | end | ||
| 534 | end | ||
| 535 | |||
| 521 | --- Makes the specified sprite face toward the †arget sprite. | 536 | --- Makes the specified sprite face toward the †arget sprite. |
| 522 | -- This version of the function uses the closest cardinal direction. | 537 | -- This version of the function uses the closest cardinal direction. |
| 523 | -- @param spriteName the name of the sprite to change the direction of | 538 | -- @param spriteName the name of the sprite to change the direction of |
